OpenMPCD
BoundaryCondition/Factory.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * Defines the `OpenMPCD::CUDA::BoundaryCondition::Factory` class.
4  */
5 
6 #ifndef OPENMPCD_CUDA_BOUNDARYCONDITION_FACTORY_HPP
7 #define OPENMPCD_CUDA_BOUNDARYCONDITION_FACTORY_HPP
8 
11 
12 #include <vector>
13 
14 namespace OpenMPCD
15 {
16 namespace CUDA
17 {
18 namespace BoundaryCondition
19 {
20 
21 /**
22  * Class used to construct `OpenMPCD::CUDA::BoundaryCondition::Base` instances.
23  *
24  * Boundary conditions are configured in the OpenMPCD configuration file in the
25  * `boundaryConditions` setting, which has to contain exactly one configuration
26  * group, the name of which decides which type of boundary condition to use.
27  */
28 class Factory
29 {
30 private:
31  Factory(); ///< The constructor.
32 
33 public:
34  /**
35  * Returns a newly constructed boundary condition instance.
36  *
37  * The caller is responsible for deleting the pointer.
38  *
39  * @throw OpenMPCD::InvalidConfigurationException
40  * Throws if either no, or multiple, boundary conditions have been
41  * defined in the given configuration group, or none of the
42  * configured boundary conditions are recognized.
43  *
44  * @param[in] config
45  * The configuration group that holds the boundary condition
46  * configuration.
47  * @param[in] simulationBoxSizeX
48  * The size of the primary simulation volume along the `x`
49  * direction.
50  * @param[in] simulationBoxSizeY
51  * The size of the primary simulation volume along the `y`
52  * direction.
53  * @param[in] simulationBoxSizeZ
54  * The size of the primary simulation volume along the `z`
55  * direction.
56  */
58  const Configuration::Setting& config,
59  const unsigned int simulationBoxSizeX,
60  const unsigned int simulationBoxSizeY,
61  const unsigned int simulationBoxSizeZ);
62 }; //class Factory
63 
64 } //namespace BoundaryCondition
65 } //namespace CUDA
66 } //namespace OpenMPCD
67 
68 #endif //OPENMPCD_CUDA_BOUNDARYCONDITION_FACTORY_HPP
OpenMPCD::CUDA::BoundaryCondition::Factory::getInstance
static BoundaryCondition::Base * getInstance(const Configuration::Setting &config, const unsigned int simulationBoxSizeX, const unsigned int simulationBoxSizeY, const unsigned int simulationBoxSizeZ)
Returns a newly constructed boundary condition instance.
Definition: BoundaryCondition/Factory.cpp:14
Base.hpp
OpenMPCD::Configuration::Setting
Represents a setting in the configuration.
Definition: Configuration.hpp:36
Configuration.hpp
OpenMPCD::CUDA::BoundaryCondition::Factory
Class used to construct OpenMPCD::CUDA::BoundaryCondition::Base instances.
Definition: BoundaryCondition/Factory.hpp:28
OpenMPCD::CUDA::BoundaryCondition::Base
Base class for boundary condition.
Definition: CUDA/BoundaryCondition/Base.hpp:26