15 , subtracted(subtracted) {}
91 io.
dump(storage, stats);
99 simulation.
run(storage);
101 std::cout <<
"Error during simulation: " << e.
what() << std::endl;
#define NOT_IMPLEMENTED
Helper macro marking missing implementation.
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
BasicVector< Float > Vector
Object providing safe access to continuous memory of data.
Output saving data to binary data without loss of precision.
virtual Expected< Path > dump(const Storage &storage, const Statistics &stats) override
Saves data from particle storage into the file.
Helper object defining three-dimensional interval (box).
virtual void setUp(SharedPtr< Storage > storage) override
Prepares the run, creates logger, output, ...
virtual void tearDown(const Storage &storage, const Statistics &stats) override
Called after the run.
virtual const char * what() const noexcept
Base class for computational domains.
virtual Float getSurfaceArea() const =0
Returns the surface area of the domain.
virtual Box getBoundingBox() const =0
Returns the bounding box of the domain.
virtual Float getVolume() const =0
Returns the total volume of the domain.
virtual bool contains(const Vector &v) const =0
Checks if the given point lies inside the domain.
virtual Vector getCenter() const =0
Returns the center of the domain.
Defines the interface for a run.
Statistics run(Storage &storage)
Runs the simulation.
Object for adding one or more bodies with given material into a Storage.
BodyView addMonolithicBody(Storage &storage, const BodySettings &body)
Creates a monolithic body by filling given domain with particles.
Wrapper of type value of which may or may not be present.
Object representing a path on a filesystem.
Spherical domain, defined by the center of sphere and its radius.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
virtual Float getVolume() const override
Returns the total volume of the domain.
virtual void getSubset(ArrayView< const Vector >, Array< Size > &, const SubsetType) const override
Returns an array of indices, marking vectors with given property by their index.
virtual Vector getCenter() const override
Returns the center of the domain.
virtual Box getBoundingBox() const override
Returns the bounding box of the domain.
virtual void addGhosts(ArrayView< const Vector >, Array< Ghost > &, const Float, const Float) const override
Duplicates positions located close to the boundary, placing copies ("ghosts") symmetrically to the ot...
virtual Float getSurfaceArea() const override
Returns the surface area of the domain.
virtual void project(ArrayView< Vector >, Optional< ArrayView< Size >>) const override
Projects vectors outside of the domain onto its boundary.
SubtractDomain(IDomain &primary, IDomain &subtracted)
virtual bool contains(const Vector &v) const override
Checks if the given point lies inside the domain.
virtual void getDistanceToBoundary(ArrayView< const Vector >, Array< Float > &) const override
Returns distances of particles lying close to the boundary.
@ RUN_NAME
User-specified name of the run, used in some output files.