Go to the documentation of this file.
6 #ifndef OPENMPCD_DENSITYPROFILE_HPP
7 #define OPENMPCD_DENSITYPROFILE_HPP
59 const unsigned int mpcBoxSizeX,
60 const unsigned int mpcBoxSizeY,
61 const unsigned int mpcBoxSizeZ,
71 return cellSubdivisionsX;
80 return cellSubdivisionsY;
89 return cellSubdivisionsZ;
109 void add(
const std::vector<std::vector<std::vector<FP> > >::size_type x,
110 const std::vector<std::vector<FP> >::size_type y,
111 const std::vector<FP>::size_type z,
114 #ifdef OPENMPCD_DEBUG
117 if(y>=points[x].size())
119 if(z>=points[x][y].size())
123 points[x][y][z] += m;
134 void saveToFile(
const std::string& path)
const;
137 std::vector<std::vector<std::vector<FP> > > points;
138 unsigned int fillCount;
140 unsigned int cellSubdivisionsX;
141 unsigned int cellSubdivisionsY;
142 unsigned int cellSubdivisionsZ;
#define OPENMPCD_THROW(ExceptionType, message)
Throws the given ExceptionType, passing the given message along with file and line number information...
void saveToFile(const std::string &path) const
Saves the data into a file with the given path.
unsigned int getCellSubdivisionsZ() const
Returns the number of times collision cells are subdivided along the direction.
void incrementFillCount()
Increments the fill count.
double FP
Default floating point type.
unsigned int getCellSubdivisionsY() const
Returns the number of times collision cells are subdivided along the direction.
DensityProfile(const unsigned int mpcBoxSizeX, const unsigned int mpcBoxSizeY, const unsigned int mpcBoxSizeZ, const Configuration::Setting &settings)
The constructor.
unsigned int getCellSubdivisionsX() const
Returns the number of times collision cells are subdivided along the direction.
Represents a setting in the configuration.
Exception for out-of-bounds access.
Represents a density profile.
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.