OpenMPCD
|
Class for measurements of velocity autocorrelation in MPC fluids that consist of doublets of particles. More...
#include <Doublets.hpp>
Public Member Functions | |
Doublets (const Simulation *const sim, DeviceMemoryManager *const devMemMgr, const MPCFluid::Base *const mpcFluid_) | |
The constructor. More... | |
virtual | ~Doublets () |
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... | |
MPCParticleVelocityType * | currentVelocities |
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... | |
Class for measurements of velocity autocorrelation in MPC fluids that consist of doublets of particles.
The particles that belong to one doublet are assumed to be adjacent to each other in memory. E.g. doublet 0 consists of particles 0 and 1, doublet 1 of particles 2 and 3, etc.
Definition at line 27 of file Instrumentation/VelocityAutocorrelation/Doublets.hpp.
OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Doublets::Doublets | ( | const Simulation *const | sim, |
DeviceMemoryManager *const | devMemMgr, | ||
const MPCFluid::Base *const | mpcFluid_ | ||
) |
The constructor.
[in] | sim | The simulation instance. |
[in] | devMemMgr | The Device memory manager. |
[in] | mpcFluid_ | The MPC fluid to measure. |
|
inlinevirtual |
The destructor.
Definition at line 47 of file Instrumentation/VelocityAutocorrelation/Doublets.hpp.
|
staticinherited |
Returns whether the given simulation configured this instrumentation.
[in] | sim | The simulation instance. |
NULLPointerException | Throws if sim is nullptr . |
|
inherited |
Performs measurements.
|
protectedvirtual |
Populates the currentVelocities buffer with the current velocities of the fluid constituents.
Implements OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Base.
|
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).
[in] | rundir | The path to the run directory. Within that directory, the data will be saved to the file velocityAutocorrelations.data . |
|
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.
|
protectedinherited |
Current velocities of the fluid constituents.
Definition at line 318 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.
|
protectedinherited |
The Device memory manager.
Definition at line 309 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.
|
protectedinherited |
The maximum time between snapshots.
Definition at line 315 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.
|
protectedinherited |
The fluid to measure.
Definition at line 310 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.
|
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.
|
protectedinherited |
The simulation instance.
Definition at line 308 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.
|
protectedinherited |
The snapshots of the fluid constituent velocities.
Definition at line 317 of file CUDA/MPCFluid/Instrumentation/VelocityAutocorrelation/Base.hpp.