14 #include <unordered_map>
31 std::unordered_map<Indices, Float, std::hash<Indices>, IndicesEqual> map;
Spatial derivatives to be computed by SPH discretization.
Right-hand side term of SPH equations.
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Base interface for all solvers.
Vectorized computations with integral numbers.
INLINE bool all(const Indices &i)
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Template for thread-local storage.
Object providing safe access to continuous memory of data.
Generic SPH solver, evaluating equations for each particle separately.
AutoPtr< IBoundaryCondition > bc
virtual void beforeLoop(Storage &storage, Statistics &stats) override
virtual void sanityCheck(const Storage &storage) const override
AsymmetricSolver(IScheduler &scheduler, const RunSettings &settings, const EquationHolder &eqs)
virtual void afterLoop(Storage &storage, Statistics &stats) override
virtual void loop(Storage &storage, Statistics &stats) override
ThreadLocal< ThreadData > threadData
DerivativeHolder derivatives
Holds all derivatives (shared for all threads)
Container holding derivatives and the storage they accumulate to.
Container holding equation terms.
Base class for asymmetric SPH solvers.
IScheduler & scheduler
Scheduler used to parallelize the solver.
Float getMaxSearchRadius(const Storage &storage) const
virtual void loop(Storage &storage, Statistics &stats)=0
virtual void sanityCheck(const Storage &storage) const =0
LutKernel< DIMENSIONS > kernel
Selected SPH kernel.
EquationHolder equations
Holds all equation terms evaluated by the solver.
Optional< RadiiHashMap > radiiMap
Hash map used to determine search radii of particles.
virtual void beforeLoop(Storage &storage, Statistics &stats)=0
virtual void afterLoop(Storage &storage, Statistics &stats)=0
AutoPtr< ISymmetricFinder > finder
Structure used to search for neighbouring particles.
virtual void create(Storage &storage, IMaterial &material) const override
Initializes all quantities needed by the solver in the storage.
IAsymmetricSolver(IScheduler &scheduler, const RunSettings &settings, const EquationHolder &eqs)
virtual RawPtr< const IBasicFinder > getFinder(ArrayView< const Vector > r)
Returns a finder, already build using the provided positions.
virtual void integrate(Storage &storage, Statistics &stats) override
Computes derivatives of all time-dependent quantities.
Base object for boundary conditions.
Material settings and functions specific for one material.
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Base class for all solvers.
Extension of IBasicFinder, allowing to search only particles with lower rank in smoothing length.
Helper object for storing three (possibly four) int or bool values.
Helper structure storing search radii for particles as hash map.
Float getRadius(const Vector &r) const
Returns the required search radius for particle at given position.
void build(ArrayView< const Vector > r, const Float kernelRadius)
Computes the search radii at each cell in space.
Non-owning wrapper of pointer.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
Array< Size > idxs
Indices of real neighbours.
Array< Vector > grads
Cached array of gradients.
Array< NeighbourRecord > neighs
Cached array of neighbours, to avoid allocation every step.