48 return cached.box.center();
78 const Float eps)
const override;
81 bool containImpl(
const Vector& v)
const;
#define NOT_IMPLEMENTED
Helper macro marking missing implementation.
Object defining computational domain.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
#define NAMESPACE_SPH_END
static AffineMatrix identity()
Object providing safe access to continuous memory of data.
Generic dynamically allocated resizable storage.
Helper object defining three-dimensional interval (box).
Base class for computational domains.
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Domain represented by triangular mesh.
virtual Box getBoundingBox() const override
Returns the bounding box of the domain.
virtual Float getVolume() const override
Returns the total volume of the domain.
virtual void getSubset(ArrayView< const Vector > vs, Array< Size > &output, const SubsetType type) const override
Returns an array of indices, marking vectors with given property by their index.
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.
MeshDomain(IScheduler &scheduler, Array< Triangle > &&triangles, const MeshParams ¶ms=MeshParams{})
virtual Vector getCenter() const override
Returns the center of the domain.
virtual void addGhosts(ArrayView< const Vector > vs, Array< Ghost > &ghosts, const Float eta, const Float eps) 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 > vs, Optional< ArrayView< Size >> indices) const override
Projects vectors outside of the domain onto its boundary.
Wrapper of type value of which may or may not be present.
bool precomputeInside
If true, cached volume is created to allow fast calls of contains.
Size volumeResolution
Resolution of the volume, used if precomputeInside == true.
AffineMatrix matrix
Arbitrary transformation matrix applied on the mesh.