OpenMPCD
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Chains Class Reference

Class for measurements of velocity autocorrelation in MPC fluids that consist of chains of particles. More...

#include <Chains.hpp>

Inheritance diagram for OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Chains:
Inheritance graph
[legend]
Collaboration diagram for OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Chains:
Collaboration graph
[legend]

Public Member Functions

 Chains (const unsigned int chainLength_, const Simulation *const sim, DeviceMemoryManager *devMemMgr, const MPCFluid::Base *const mpcFluid_)
 The constructor. More...
 
virtual ~Chains ()
 The destructor. More...
 
void measure ()
 Performs measurements. More...
 
void save (const std::string &rundir) const
 Saves the data to the given run directory. More...
 

Static Public Member Functions

static bool isConfigured (const Simulation *const sim)
 Returns whether the given simulation configured this instrumentation. More...
 

Protected Member Functions

virtual void populateCurrentVelocities ()
 Populates the currentVelocities buffer with the current velocities of the fluid constituents. More...
 

Protected Attributes

const Simulation *const simulation
 The simulation instance. More...
 
DeviceMemoryManager *const deviceMemoryManager
 The Device memory manager. More...
 
const MPCFluid::Base *const mpcFluid
 The fluid to measure. More...
 
const unsigned int numberOfConstituents
 The number of logical constituents (e.g. pairs, triplets, ...) in the fluid. More...
 
FP measurementTime
 The maximum time between snapshots. More...
 
std::vector< Snapshot * > snapshots
 The snapshots of the fluid constituent velocities. More...
 
MPCParticleVelocityTypecurrentVelocities
 Current velocities of the fluid constituents. More...
 
std::deque< boost::tuple< FP, FP, MPCParticleVelocityType > > autocorrelations
 Collection of tuples consisting of, in that order, \( t_i \), \( t_j \), and \( V \left( t_i, t_j \right) \). More...
 

Detailed Description

Class for measurements of velocity autocorrelation in MPC fluids that consist of chains of particles.

All chains are assumed to be of the same length.

The particles that belong to one chain are assumed to be adjacent to each other in memory. E.g. chain 0 consists of particles [0,n-1], chain 1 of particles [n,2n-1], etc.

Definition at line 29 of file Instrumentation/VelocityAutocorrelation/Chains.hpp.

Constructor & Destructor Documentation

◆ Chains()

OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Chains::Chains ( const unsigned int  chainLength_,
const Simulation *const  sim,
DeviceMemoryManager devMemMgr,
const MPCFluid::Base *const  mpcFluid_ 
)

The constructor.

Parameters
[in]chainLength_The number of MPC fluid particles per chain.
[in]simThe simulation instance.
[in]devMemMgrThe Device memory manager.
[in]mpcFluid_The MPC fluid to measure.

◆ ~Chains()

virtual OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Chains::~Chains ( )
inlinevirtual

The destructor.

Definition at line 50 of file Instrumentation/VelocityAutocorrelation/Chains.hpp.

Member Function Documentation

◆ isConfigured()

static bool OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::isConfigured ( const Simulation *const  sim)
staticinherited

Returns whether the given simulation configured this instrumentation.

Parameters
[in]simThe simulation instance.
Exceptions
NULLPointerExceptionThrows if sim is nullptr.

◆ measure()

void OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::measure ( )
inherited

Performs measurements.

◆ populateCurrentVelocities()

virtual void OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Chains::populateCurrentVelocities ( )
protectedvirtual

Populates the currentVelocities buffer with the current velocities of the fluid constituents.

Implements OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base.

◆ save()

void OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::save ( const std::string &  rundir) const
inherited

Saves the data to the given run directory.

The given run directory is created if necessary, and so is the data file therein; if the data file already exists, it will be truncated.

Multiple lines will be written to the file, each consisting of three tab-separated columns: The first column corresponds to the simulation time \( t_i \) of a snapshot \( i \); the second column to the simulation time \( t_j \ge t_i \) ; and finally, the third column contains \( V \left( t_i, t_j \right) \). One such line will be written for every measured \( V \) (see class documentation for details).

The lines are ordered by ascending \( t_j \) first, and then by ascending snapshot position in memory (see class documentation for details).

Parameters
[in]rundirThe path to the run directory. Within that directory, the data will be saved to the file velocityAutocorrelations.data.

Member Data Documentation

◆ autocorrelations

std::deque<boost::tuple<FP, FP, MPCParticleVelocityType> > OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::autocorrelations
protectedinherited

Collection of tuples consisting of, in that order, \( t_i \), \( t_j \), and \( V \left( t_i, t_j \right) \).

Definition at line 320 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ currentVelocities

MPCParticleVelocityType* OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::currentVelocities
protectedinherited

Current velocities of the fluid constituents.

Definition at line 318 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ deviceMemoryManager

DeviceMemoryManager* const OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::deviceMemoryManager
protectedinherited

The Device memory manager.

Definition at line 309 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ measurementTime

FP OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::measurementTime
protectedinherited

The maximum time between snapshots.

Definition at line 315 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ mpcFluid

const MPCFluid::Base* const OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::mpcFluid
protectedinherited

The fluid to measure.

Definition at line 310 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ numberOfConstituents

const unsigned int OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::numberOfConstituents
protectedinherited

The number of logical constituents (e.g. pairs, triplets, ...) in the fluid.

Definition at line 312 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ simulation

const Simulation* const OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::simulation
protectedinherited

The simulation instance.

Definition at line 308 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.

◆ snapshots

std::vector<Snapshot*> OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base::snapshots
protectedinherited

The snapshots of the fluid constituent velocities.

Definition at line 317 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.


The documentation for this class was generated from the following file: