OpenMPCD
GaussianRods.cpp
2 
5 
7 
9  const Simulation* const sim, DeviceMemoryManager* const devMemMgr,
10  const MPCFluid::GaussianRods* const mpcFluid_)
11  : Base(sim->getConfiguration(), mpcFluid_),
12  simulation(sim), mpcFluid(mpcFluid_),
13  bondLengthHistogram("gaussianRods.bondLengthHistogram", sim->getConfiguration())
14 {
16  velocityAutocorrelation = new VelocityAutocorrelation::Doublets(sim, devMemMgr, mpcFluid_);
17 }
18 
20 {
21  static const Vector3D<MPCParticleVelocityType> flowDirection(1, 0, 0);
22 
23  for(unsigned int i=0; i<mpcFluid->getParticleCount(); i+=2)
24  {
27 
28  const Vector3D<MPCParticlePositionType> R = r_2 - r_1;
29 
30  bondLengthHistogram.fill(R.magnitude());
31  }
32 }
33 
34 void GaussianRods::saveSpecific(const std::string& rundir) const
35 {
36  bondLengthHistogram.save(rundir+"/gaussianRods/bondLengthHistogram.data");
37 }
OpenMPCD::RemotelyStoredVector
Represents a vector whose data is stored elsewhere.
Definition: RemotelyStoredVector.hpp:26
OpenMPCD::CUDA::MPCFluid::GaussianRods
Fluid consisting of Gaussian rods with a certain mean length.
Definition: GaussianRods.hpp:27
OpenMPCD::CUDA::DeviceMemoryManager
Class for managing memory on the CUDA Device.
Definition: DeviceMemoryManager.hpp:21
OpenMPCD::Vector3D
3-dimensional vector.
Definition: Vector3D.hpp:38
OpenMPCD::CUDA::MPCFluid::Instrumentation::GaussianRods::saveSpecific
virtual void saveSpecific(const std::string &rundir) const
Saves the data to the given run directory.
Definition: GaussianRods.cpp:34
OpenMPCD::CUDA::MPCFluid::Instrumentation
Namespace for instrumentation classes for MPC fluids.
Definition: CUDA/MPCFluid/Instrumentation/Base.hpp:29
OpenMPCD::CUDA::MPCFluid::Instrumentation::Base::fourierTransformedVelocity
FourierTransformedVelocity::Base * fourierTransformedVelocity
Measures Fourier-transformed velocities.
Definition: CUDA/MPCFluid/Instrumentation/Base.hpp:160
OpenMPCD::CUDA::MPCFluid::Instrumentation::VelocityAutocorrelation::Doublets
Class for measurements of velocity autocorrelation in MPC fluids that consist of doublets of particle...
Definition: Instrumentation/VelocityAutocorrelation/Doublets.hpp:27
OpenMPCD::CUDA::Simulation
MPCD simulation with Molecular Dynamics on CUDA-capable GPUs.
Definition: CUDA/Simulation.hpp:48
OpenMPCD::Histogram::save
void save(const std::string &filename, const FP binPoint=0.5) const
Saves the histogram at the given path.
Definition: Histogram.cpp:75
OpenMPCD::Vector3D::magnitude
OPENMPCD_CUDA_HOST_AND_DEVICE RealType magnitude() const
Returns the magnitude of this vector.
Definition: Vector3D.hpp:236
OpenMPCD::CUDA::MPCFluid::Instrumentation::GaussianRods::measureSpecific
virtual void measureSpecific()
Performs measurements.
Definition: GaussianRods.cpp:19
OpenMPCD::CUDA::MPCFluid::Instrumentation::FourierTransformedVelocity::Doublets
Class for measurements of Fourier-transformed velocities in MPC fluids that consist of doublets of pa...
Definition: Instrumentation/FourierTransformedVelocity/Doublets.hpp:28
OpenMPCD::CUDA::MPCFluid::Base::getParticleCount
unsigned int getParticleCount() const
Returns the number of MPC fluid particles.
Definition: CUDA/MPCFluid/Base.hpp:72
OpenMPCD::Histogram::fill
void fill(const FP val)
Adds an entry to the histogram.
Definition: Histogram.cpp:21
OpenMPCD::CUDA::MPCFluid::Instrumentation::Base
Base class for MPC fluids instrumentation.
Definition: CUDA/MPCFluid/Instrumentation/Base.hpp:34
GaussianRods.hpp
OpenMPCD::CUDA::MPCFluid::Instrumentation::GaussianRods::GaussianRods
GaussianRods(const Simulation *const sim, DeviceMemoryManager *const devMemMgr, const MPCFluid::GaussianRods *const mpcFluid_)
The constructor.
Definition: GaussianRods.cpp:8
Doublets.hpp
OpenMPCD::CUDA::MPCFluid::Base::getPosition
const RemotelyStoredVector< const MPCParticlePositionType > getPosition(const unsigned int particleID) const
Returns a MPC fluid particle's position vector.
Doublets.hpp
OpenMPCD::CUDA::MPCFluid::Instrumentation::Base::velocityAutocorrelation
VelocityAutocorrelation::Base * velocityAutocorrelation
Measures velocity autocorrelation.
Definition: CUDA/MPCFluid/Instrumentation/Base.hpp:169