Go to the documentation of this file.
6 #ifndef OPENMPCD_CUDA_MPCFLUID_INSTRUMENTATION_VELOCITYAUTOCORRELATION_BASE_HPP
7 #define OPENMPCD_CUDA_MPCFLUID_INSTRUMENTATION_VELOCITYAUTOCORRELATION_BASE_HPP
12 #include <boost/tuple/tuple.hpp>
28 namespace Instrumentation
33 namespace VelocityAutocorrelation
192 const unsigned int numberOfConstituents_);
233 void save(
const std::string& rundir)
const;
258 void updateSnapshots();
264 void updateSnapshot(Snapshot*
const snapshot);
272 bool initializeSnapshotIfAppropriate(
const unsigned int snapshotID);
278 void measureWithSnapshot(Snapshot*
const snapshot);
305 void saveAutocorrelations(
const std::string& path)
const;
Base class for MPC fluids.
const MPCFluid::Base *const mpcFluid
The fluid to measure.
MPCParticleVelocityType * getBuffer()
Returns the Device buffer used to the save MPC fluid constituent velocities.
MPCParticleVelocityType * currentVelocities
Current velocities of the fluid constituents.
Snapshot(const unsigned int numberOfConstituents, DeviceMemoryManager *const devMemMgr)
The constructor.
Class for managing memory on the CUDA Device.
static bool isConfigured(const Simulation *const sim)
Returns whether the given simulation configured this instrumentation.
Represents a snapshot of the MPC fluid constituent velocities.
Base(const Simulation *const sim, DeviceMemoryManager *const devMemMgr, const MPCFluid::Base *const mpcFluid_, const unsigned int numberOfConstituents_)
The constructor.
void setSnapshotTime(const FP time)
Sets the MPC timestamp of the last snapshot.
~Snapshot()
The destructor.
void save(const std::string &rundir) const
Saves the data to the given run directory.
FP getSnapshotTime() const
Returns the MPC timestamp of the last snapshot.
MPCD simulation with Molecular Dynamics on CUDA-capable GPUs.
void measure()
Performs measurements.
std::vector< Snapshot * > snapshots
The snapshots of the fluid constituent velocities.
FP measurementTime
The maximum time between snapshots.
virtual ~Base()
The destructor.
double FP
Default floating point type.
FP MPCParticleVelocityType
The data type for the velocities of MPC particles.
const unsigned int numberOfConstituents
The number of logical constituents (e.g. pairs, triplets, ...) in the fluid.
std::deque< boost::tuple< FP, FP, MPCParticleVelocityType > > autocorrelations
Collection of tuples consisting of, in that order, , , and .
virtual void populateCurrentVelocities()=0
Populates the Device buffer with the current velocities of the fluid constituents.
Base class for measurements of velocity autocorrelation in MPC fluids.
const Simulation *const simulation
The simulation instance.
DeviceMemoryManager *const deviceMemoryManager
The Device memory manager.