OpenMPCD
include
OpenMPCD
CUDA
MPCFluid
MPCFluid/Factory.hpp
Go to the documentation of this file.
1
/**
2
* @file
3
* Defines the OpenMPCD::CUDA::MPCFluid::Factory class.
4
*/
5
6
#ifndef OPENMPCD_CUDA_MPCFLUID_FACTORY_HPP
7
#define OPENMPCD_CUDA_MPCFLUID_FACTORY_HPP
8
9
#include <
OpenMPCD/CUDA/MPCFluid/Base.hpp
>
10
#include <
OpenMPCD/CUDA/Simulation.hpp
>
11
12
namespace
OpenMPCD
13
{
14
namespace
CUDA
15
{
16
namespace
MPCFluid
17
{
18
19
/**
20
* Class used to construct MPC fluid instances.
21
*/
22
class
Factory
23
{
24
private
:
25
Factory
();
///< The constructor.
26
27
public
:
28
/**
29
* Returns a newly constructed MPC fluid.
30
*
31
* The caller is responsible for deleting the pointer.
32
* If no MPC fluid has been configured, or more precisely, if
33
* the configuration key `mpc.fluid` is not set, returns `nullptr`.
34
*
35
* @throw OpenMPCD::InvalidConfigurationException
36
* Throws if an unknown key is set in `mpc.fluid`.
37
*
38
* @param[in] sim The simulation instance.
39
* @param[in] config The simulation configuration.
40
* @param[in] count The number of fluid particles.
41
* @param[in] rng A random number generator.
42
*/
43
static
MPCFluid::Base
*
getInstance
(
CUDA::Simulation
*
const
sim,
44
const
Configuration
& config,
45
const
unsigned
int
count,
46
RNG
& rng);
47
};
48
49
}
//namespace MPCFluid
50
}
//namespace CUDA
51
}
//namespace OpenMPCD
52
53
#endif
OpenMPCD::CUDA::MPCFluid::Base
Base class for MPC fluids.
Definition:
CUDA/MPCFluid/Base.hpp:40
OpenMPCD::Configuration
Represents the configuration of the simulation.
Definition:
Configuration.hpp:28
Base.hpp
OpenMPCD::CUDA::Simulation
MPCD simulation with Molecular Dynamics on CUDA-capable GPUs.
Definition:
CUDA/Simulation.hpp:48
OpenMPCD::RNG
boost::mt11213b RNG
The random number generator type.
Definition:
Types.hpp:18
Simulation.hpp
OpenMPCD::CUDA::MPCFluid::Factory
Class used to construct MPC fluid instances.
Definition:
MPCFluid/Factory.hpp:22
OpenMPCD::CUDA::MPCFluid::Factory::getInstance
static MPCFluid::Base * getInstance(CUDA::Simulation *const sim, const Configuration &config, const unsigned int count, RNG &rng)
Returns a newly constructed MPC fluid.
Definition:
MPCFluid/Factory.cpp:13
Generated by
1.8.17