OpenMPCD
Public Member Functions | Friends | List of all members
OpenMPCD::CUDA::Simulation Class Reference

MPCD simulation with Molecular Dynamics on CUDA-capable GPUs. More...

#include <Simulation.hpp>

Public Member Functions

 Simulation (const std::string &configurationFilename, const unsigned int rngSeed, const std::string &dir)
 The constructor. More...
 
 Simulation (const Configuration &configuration, const unsigned int rngSeed)
 The constructor. More...
 
 ~Simulation ()
 The destructor. More...
 
const ConfigurationgetConfiguration () const
 Returns the configuration. More...
 
void warmup ()
 Performs the warmup step. More...
 
void sweep ()
 Performs a sweep. More...
 
unsigned int getNumberOfCompletedSweeps () const
 Returns the number of times sweep has completed, not counting warmup sweeps as performed by warmup. More...
 
unsigned int getSimulationBoxSizeX () const
 Returns the size of the primary simulation box along the x direction. More...
 
unsigned int getSimulationBoxSizeY () const
 Returns the size of the primary simulation box along the y direction. More...
 
unsigned int getSimulationBoxSizeZ () const
 Returns the size of the primary simulation box along the z direction. More...
 
unsigned int getCollisionCellCount () const
 Returns the number of collision cells. More...
 
bool hasMPCFluid () const
 Returns whether an MPC fluid has been configured. More...
 
const MPCFluid::BasegetMPCFluid () const
 Returns the MPC fluid. More...
 
const MPCSolute::Base< MPCParticlePositionType, MPCParticleVelocityType > & getMPCSolute () const
 Returns the MPC solute. More...
 
const BoundaryCondition::BasegetBoundaryConditions () const
 Returns the boundary conditions. More...
 
bool hasSolute () const
 Returns true if Simulation has an instance of MPCSolute::Base. More...
 
FP getMPCTime () const
 Returns the MPC time that has passed since the start of the simulation. More...
 
FP getMPCTimestep () const
 Returns the MPC timestep. More...
 
std::string getRundir () const
 Returns the directory containing the Simulation run data. More...
 
DeviceMemoryManagergetDeviceMemoryManager ()
 Returns the Device memory manager. More...
 

Friends

class OpenMPCDTest::CUDA::SimulationTest
 

Detailed Description

MPCD simulation with Molecular Dynamics on CUDA-capable GPUs.

For a description of the Maxwell-Boltzmann-Scaling Thermostat, see "Cell-level canonical sampling by velocity scaling for multiparticle collision dynamics simulations" by C. C. Huang, A. Chatterji, G. Sutmann, G. Gompper, and R. G. Winkler. Journal of Computational Physics 229 (2010) 168-177. DOI:10.1016/j.jcp.2009.09.024

Definition at line 48 of file CUDA/Simulation.hpp.

Constructor & Destructor Documentation

◆ Simulation() [1/2]

OpenMPCD::CUDA::Simulation::Simulation ( const std::string &  configurationFilename,
const unsigned int  rngSeed,
const std::string &  dir 
)

The constructor.

Parameters
[in]configurationFilenameThe path to the simulation configuration.
[in]rngSeedThe seed for the random number generator.
[in]dirThe directory where simulation runs will be saved.

◆ Simulation() [2/2]

OpenMPCD::CUDA::Simulation::Simulation ( const Configuration configuration,
const unsigned int  rngSeed 
)

The constructor.

Parameters
[in]configurationThe configuration instance.
[in]rngSeedThe seed for the random number generator.

◆ ~Simulation()

OpenMPCD::CUDA::Simulation::~Simulation ( )

The destructor.

Member Function Documentation

◆ getBoundaryConditions()

const BoundaryCondition::Base* OpenMPCD::CUDA::Simulation::getBoundaryConditions ( ) const
inline

Returns the boundary conditions.

Definition at line 182 of file CUDA/Simulation.hpp.

◆ getCollisionCellCount()

unsigned int OpenMPCD::CUDA::Simulation::getCollisionCellCount ( ) const
inline

Returns the number of collision cells.

Definition at line 129 of file CUDA/Simulation.hpp.

◆ getConfiguration()

const Configuration& OpenMPCD::CUDA::Simulation::getConfiguration ( ) const
inline

Returns the configuration.

Definition at line 81 of file CUDA/Simulation.hpp.

◆ getDeviceMemoryManager()

DeviceMemoryManager* OpenMPCD::CUDA::Simulation::getDeviceMemoryManager ( )
inline

Returns the Device memory manager.

Definition at line 224 of file CUDA/Simulation.hpp.

◆ getMPCFluid()

const MPCFluid::Base& OpenMPCD::CUDA::Simulation::getMPCFluid ( ) const
inline

Returns the MPC fluid.

Exceptions
OpenMPCD::InvalidCallExceptionIf OPENMPCD_DEBUG is defined, throws if !hasMPCFluid().

Definition at line 152 of file CUDA/Simulation.hpp.

◆ getMPCSolute()

const MPCSolute::Base< MPCParticlePositionType, MPCParticleVelocityType>& OpenMPCD::CUDA::Simulation::getMPCSolute ( ) const
inline

Returns the MPC solute.

Exceptions
OpenMPCD::InvalidCallExceptionIf OPENMPCD_DEBUG is defined, throws if no solute has been configured.

Definition at line 169 of file CUDA/Simulation.hpp.

◆ getMPCTime()

FP OpenMPCD::CUDA::Simulation::getMPCTime ( ) const
inline

Returns the MPC time that has passed since the start of the simulation.

Definition at line 200 of file CUDA/Simulation.hpp.

◆ getMPCTimestep()

FP OpenMPCD::CUDA::Simulation::getMPCTimestep ( ) const
inline

Returns the MPC timestep.

Definition at line 208 of file CUDA/Simulation.hpp.

◆ getNumberOfCompletedSweeps()

unsigned int OpenMPCD::CUDA::Simulation::getNumberOfCompletedSweeps ( ) const

Returns the number of times sweep has completed, not counting warmup sweeps as performed by warmup.

◆ getRundir()

std::string OpenMPCD::CUDA::Simulation::getRundir ( ) const
inline

Returns the directory containing the Simulation run data.

Definition at line 216 of file CUDA/Simulation.hpp.

◆ getSimulationBoxSizeX()

unsigned int OpenMPCD::CUDA::Simulation::getSimulationBoxSizeX ( ) const
inline

Returns the size of the primary simulation box along the x direction.

Definition at line 105 of file CUDA/Simulation.hpp.

◆ getSimulationBoxSizeY()

unsigned int OpenMPCD::CUDA::Simulation::getSimulationBoxSizeY ( ) const
inline

Returns the size of the primary simulation box along the y direction.

Definition at line 113 of file CUDA/Simulation.hpp.

◆ getSimulationBoxSizeZ()

unsigned int OpenMPCD::CUDA::Simulation::getSimulationBoxSizeZ ( ) const
inline

Returns the size of the primary simulation box along the z direction.

Definition at line 121 of file CUDA/Simulation.hpp.

◆ hasMPCFluid()

bool OpenMPCD::CUDA::Simulation::hasMPCFluid ( ) const
inline

Returns whether an MPC fluid has been configured.

Definition at line 141 of file CUDA/Simulation.hpp.

◆ hasSolute()

bool OpenMPCD::CUDA::Simulation::hasSolute ( ) const
inline

Returns true if Simulation has an instance of MPCSolute::Base.

Definition at line 191 of file CUDA/Simulation.hpp.

◆ sweep()

void OpenMPCD::CUDA::Simulation::sweep ( )

Performs a sweep.

◆ warmup()

void OpenMPCD::CUDA::Simulation::warmup ( )

Performs the warmup step.


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