71 const Float surfaceLevel,
90 return std::move(triangles);
105 template <
typename TFunctor>
106 bool iterateWithIndices(
const Box& box,
const Vector& step, TFunctor&& functor);
Generic dynamically allocated resizable storage.
Object representing a three-dimensional axis-aligned box.
Generic wrappers of lambdas, functors and other callables.
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.
Array< Triangle > getSurfaceMesh(IScheduler &scheduler, const Storage &storage, const McConfig &config)
Returns the triangle mesh of the body surface (or surfaces of bodies).
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Helper object defining three-dimensional interval (box).
Single cell used in mesh generation.
INLINE Float & value(const Size idx)
INLINE Vector & node(const Size idx)
Inferface for a generic scalar field, returning a float for given position.:w.
virtual Float operator()(const Vector &pos)=0
Returns the value of the scalar field at given position.
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Marching cubes algorithm for generation of mesh from iso-surface of given scalar field.
Array< Float > phi
Values of the scalar field defining the surface.
INLINE Array< Triangle > getTriangles() &&
Returns the generated triangles.
INLINE Array< Triangle > & getTriangles() &
Returns the generated triangles.
void addComponent(const Box &box, const Float gridResolution)
Adds a triangle mesh representing the boundary of particles.
MarchingCubes(IScheduler &scheduler, const Float surfaceLevel, const SharedPtr< IScalarField > &field, Function< bool(Float progress)> progressCallback=nullptr)
Constructs the object using given scalar field.
Array with fixed number of allocated elements.
Container storing all quantities used within the simulations.
Function< bool(Float progress)> progressCallback
Generic functor called during MC evaluation.
Float smoothingMult
Multiplier of the smoothing lengths.
Float gridResolution
Absolute size of each produced triangle.
bool useAnisotropicKernels
If true, anisotropic kernels of Yu & Turk (2010) are used instead of normal isotropic kernels.
Base class for all polymorphic objects.