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

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

#include <Doublets.hpp>

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

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...
 
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 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.

Constructor & Destructor Documentation

◆ Doublets()

OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Doublets::Doublets ( const Simulation *const  sim,
DeviceMemoryManager *const  devMemMgr,
const MPCFluid::Base *const  mpcFluid_ 
)

The constructor.

Parameters
[in]simThe simulation instance.
[in]devMemMgrThe Device memory manager.
[in]mpcFluid_The MPC fluid to measure.

◆ ~Doublets()

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

The destructor.

Definition at line 47 of file Instrumentation/VelocityAutocorrelation/Doublets.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::Doublets::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: