|
OpenMPCD
|
Represents a density profile. More...
#include <DensityProfile.hpp>
Public Member Functions | |
| DensityProfile (const unsigned int mpcBoxSizeX, const unsigned int mpcBoxSizeY, const unsigned int mpcBoxSizeZ, const Configuration::Setting &settings) | |
| The constructor. More... | |
| unsigned int | getCellSubdivisionsX () const |
| Returns the number of times collision cells are subdivided along the \( x \) direction. More... | |
| unsigned int | getCellSubdivisionsY () const |
| Returns the number of times collision cells are subdivided along the \( y \) direction. More... | |
| unsigned int | getCellSubdivisionsZ () const |
| Returns the number of times collision cells are subdivided along the \( z \) direction. More... | |
| void | incrementFillCount () |
| Increments the fill count. More... | |
| void | add (const std::vector< std::vector< std::vector< FP > > >::size_type x, const std::vector< std::vector< FP > >::size_type y, const std::vector< FP >::size_type z, const FP m) |
| Adds mass to the given point. More... | |
| void | saveToFile (const std::string &path) const |
| Saves the data into a file with the given path. More... | |
Represents a density profile.
This class can be configured via the instrumentation.densityProfile configuration group. If it is not present, this class will not be active. Otherwise, the following sub-settings are allowed:
cellSubdivision may be a group that has three positive integer entries, x, y, and z, which define the resolution of the profile. If, for example, x has a value of 3, this means that each collision cell is divided into three regions of equal length along the \( x \) direction, and each region is sampled individually. If cellSubdivision is not present, the values for cellSubdivision.x, cellSubdivision.y, and cellSubdivision.z default to 1. Definition at line 33 of file DensityProfile.hpp.
| OpenMPCD::DensityProfile::DensityProfile | ( | const unsigned int | mpcBoxSizeX, |
| const unsigned int | mpcBoxSizeY, | ||
| const unsigned int | mpcBoxSizeZ, | ||
| const Configuration::Setting & | settings | ||
| ) |
The constructor.
| [in] | mpcBoxSizeX | The MPC simulation box size along the \( x \) direction. |
| [in] | mpcBoxSizeY | The MPC simulation box size along the \( y \) direction. |
| [in] | mpcBoxSizeZ | The MPC simulation box size along the \( z \) direction. |
| [in] | settings | The settings for this instance. |
| OpenMPCD::InvalidArgumentException | If OPENMPCD_DEBUG is defined, throws if any of the numerical arguments is 0. |
| OpenMPCD::InvalidConfigurationException | Throws if the configuration is invalid. |
Definition at line 9 of file DensityProfile.cpp.
|
inline |
Adds mass to the given point.
The coordinates given to this function are the index of the cell and its subdivisions.
| OutOfBoundsException | If OPENMPCD_DEBUG is defined, throws if x, y, or z are too large. |
| [in] | x | The x coordinate of the point. |
| [in] | y | The y coordinate of the point. |
| [in] | z | The z coordinate of the point. |
| [in] | m | The mass to add. |
Definition at line 109 of file DensityProfile.hpp.
|
inline |
Returns the number of times collision cells are subdivided along the \( x \) direction.
Definition at line 69 of file DensityProfile.hpp.
|
inline |
Returns the number of times collision cells are subdivided along the \( y \) direction.
Definition at line 78 of file DensityProfile.hpp.
|
inline |
Returns the number of times collision cells are subdivided along the \( z \) direction.
Definition at line 87 of file DensityProfile.hpp.
|
inline |
Increments the fill count.
Definition at line 95 of file DensityProfile.hpp.
| void OpenMPCD::DensityProfile::saveToFile | ( | const std::string & | path | ) | const |
Saves the data into a file with the given path.
Each line represents one point in the density profile. The first three columns are the x, y, and z coordinates of the point, respectively. The last column shows the averaged mass density at that point.
| [in] | path | The path to save to. |
| IOException | Throws on an IO error. |
Definition at line 47 of file DensityProfile.cpp.
1.8.17