OpenMPCD
LeesEdwards.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * Defines the `OpenMPCD::CUDA::BoundaryCondition::LeesEdwards` class.
4  */
5 
6 #ifndef OPENMPCD_CUDA_BOUNDARYCONDITION_LEESEDWARDS_HPP
7 #define OPENMPCD_CUDA_BOUNDARYCONDITION_LEESEDWARDS_HPP
8 
10 
12 #include <OpenMPCD/Types.hpp>
13 
14 namespace OpenMPCD
15 {
16 namespace CUDA
17 {
18 namespace BoundaryCondition
19 {
20 
21 
22 /**
23  * Lees-Edwards boundary conditions.
24  *
25  * @see LeesEdwardsBoundaryConditions
26  *
27  * The configuration group given in the constructor is expected to have exactly
28  * one child setting, called `shearRate` and of floating-point type, that
29  * specifies the Lees-Edwards shear rate \f$ \dot{\gamma} \f$.
30  */
31 class LeesEdwards : public Base
32 {
33 public:
34  /**
35  * The constructor.
36  *
37  * @throw OpenMPCD::InvalidConfigurationException
38  * Throws if the configuration is invalid.
39  *
40  * @param[in] config
41  * The configuration group that holds the Lees-Edwards boundary
42  * condition configuration.
43  * @param[in] simulationBoxSizeX
44  * The size of the primary simulation volume along the `x`
45  * direction.
46  * @param[in] simulationBoxSizeY
47  * The size of the primary simulation volume along the `y`
48  * direction.
49  * @param[in] simulationBoxSizeZ
50  * The size of the primary simulation volume along the `z`
51  * direction.
52  */
54  const Configuration::Setting& config,
55  const unsigned int simulationBoxSizeX,
56  const unsigned int simulationBoxSizeY,
57  const unsigned int simulationBoxSizeZ);
58 
59  /**
60  * The destructor.
61  */
62  virtual ~LeesEdwards()
63  {
64  }
65 
66 public:
67  virtual FP getTotalAvailableVolume() const;
68 
69  /**
70  * Returns the Lees-Edwards shear rate \f$ \dot{\gamma} \f$.
71  */
72  FP getShearRate() const
73  {
74  return shearRate;
75  }
76 
77 private:
78  const unsigned int primarySimulationVolume;
79  ///< The total volume of the primary simulation volume.
80 
81  FP shearRate; ///< The shear rate \f$ \dot{\gamma} \f$.
82 }; //class LeesEdwards
83 
84 } //namespace BoundaryCondition
85 } //namespace CUDA
86 } //namespace OpenMPCD
87 
88 #endif //OPENMPCD_CUDA_BOUNDARYCONDITION_LEESEDWARDS_HPP
OpenMPCD::CUDA::BoundaryCondition::LeesEdwards::LeesEdwards
LeesEdwards(const Configuration::Setting &config, const unsigned int simulationBoxSizeX, const unsigned int simulationBoxSizeY, const unsigned int simulationBoxSizeZ)
The constructor.
OpenMPCD::CUDA::BoundaryCondition::LeesEdwards::getShearRate
FP getShearRate() const
Returns the Lees-Edwards shear rate .
Definition: LeesEdwards.hpp:72
OpenMPCD::CUDA::BoundaryCondition::LeesEdwards
Lees-Edwards boundary conditions.
Definition: LeesEdwards.hpp:31
Base.hpp
OpenMPCD::CUDA::BoundaryCondition::LeesEdwards::~LeesEdwards
virtual ~LeesEdwards()
The destructor.
Definition: LeesEdwards.hpp:62
OpenMPCD::FP
double FP
Default floating point type.
Definition: Types.hpp:13
Types.hpp
OpenMPCD::CUDA::BoundaryCondition::LeesEdwards::getTotalAvailableVolume
virtual FP getTotalAvailableVolume() const
Returns the total available volume.
OpenMPCD::Configuration::Setting
Represents a setting in the configuration.
Definition: Configuration.hpp:36
Configuration.hpp
OpenMPCD::CUDA::BoundaryCondition::Base
Base class for boundary condition.
Definition: CUDA/BoundaryCondition/Base.hpp:26