Go to the documentation of this file.
6 #ifndef OPENMPCD_FLOWPROFILE_HPP
7 #define OPENMPCD_FLOWPROFILE_HPP
15 #include <boost/multi_array.hpp>
16 #include <boost/shared_ptr.hpp>
73 const unsigned int mpcBoxSizeX,
74 const unsigned int mpcBoxSizeY,
75 const unsigned int mpcBoxSizeZ,
85 return cellSubdivisionsX;
94 return cellSubdivisionsY;
103 return cellSubdivisionsZ;
129 void add(
const std::size_t x,
const std::size_t y,
142 (*outputBlocks.back())[x][y][z][0].addDatum(v.
getX());
143 (*outputBlocks.back())[x][y][z][1].addDatum(v.
getY());
144 (*outputBlocks.back())[x][y][z][2].addDatum(v.
getZ());
185 void saveToFile(
const std::string& path)
const;
191 void createOutputBlock();
201 void printOutputBlockToStream(
203 std::ostream& stream)
const;
206 const unsigned int simulationBoxSizeX;
209 const unsigned int simulationBoxSizeY;
212 const unsigned int simulationBoxSizeZ;
216 unsigned int cellSubdivisionsX;
219 unsigned int cellSubdivisionsY;
222 unsigned int cellSubdivisionsZ;
226 unsigned int sweepCountPerOutput;
228 unsigned int currentBlockSweepCount;
232 boost::shared_ptr<boost::multi_array<OnTheFlyStatistics<T>, 4>
void newSweep()
Signals that a new sweep has begun.
Exception for a forbidden function call.
OPENMPCD_CUDA_HOST_AND_DEVICE T getZ() const
Returns the z coordinate.
FlowProfile(const unsigned int mpcBoxSizeX, const unsigned int mpcBoxSizeY, const unsigned int mpcBoxSizeZ, const Configuration::Setting &settings)
The constructor.
OPENMPCD_CUDA_HOST_AND_DEVICE T getX() const
Returns the x coordinate.
OPENMPCD_CUDA_HOST_AND_DEVICE T getY() const
Returns the y coordinate.
unsigned int getCellSubdivisionsZ() const
Returns the number of times collision cells are subdivided along the direction.
unsigned int getCellSubdivisionsY() const
Returns the number of times collision cells are subdivided along the direction.
unsigned int getCellSubdivisionsX() const
Returns the number of times collision cells are subdivided along the direction.
void saveToFile(const std::string &path) const
Saves the data into a file with the given path.
#define OPENMPCD_DEBUG_ASSERT_EXCEPTIONTYPE(assertion, ExceptionType)
Represents a flow profile.
Represents a setting in the configuration.
Computes sample means and variances "on-the-fly" or "online", i.e.
Exception for out-of-bounds access.
void add(const std::size_t x, const std::size_t y, const std::size_t z, const Vector3D< T > &v)
Adds data to the given point.