82 return typeid(*this) ==
typeid(other);
157 bool sumOnlyUndamaged;
179 if (d1->phase() != d2->phase()) {
181 return d1->phase() < d2->phase();
197 bool needsCreate =
true;
231 return derivatives.
size();
Buffer storing quantity values accumulated by summing over particle pairs.
DerivativePhase
Defines the phases of derivative evaluation.
@ PRECOMPUTE
Auxiliary quantities needed for evaluation of other derivatives (grad-h, correction tensor,...
Container storing sorted unique values.
uint32_t Size
Integral type used to index arrays (by default).
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Tool to measure time spent in functions and profile the code.
Container for storing particle quantities and materials.
Basic vector algebra. Computations are accelerated using SIMD.
Storage for accumulating derivatives.
Wrapper of pointer that deletes the resource from destructor.
CorrectionTensor(const RunSettings &settings)
virtual void create(Accumulated &results) override
Emplace all needed buffers into shared storage.
virtual void initialize(const Storage &input, Accumulated &results) override
Initialize derivative before iterating over neighbours.
virtual DerivativePhase phase() const override
Returns the phase of the derivative.
virtual void evalNeighs(Size i, ArrayView< const Size > neighs, ArrayView< const Vector > grads) override
Compute derivatives of given particle.
Container holding derivatives and the storage they accumulate to.
virtual void require(AutoPtr< IDerivative > &&derivative)
Adds derivative if not already present.
void evalSymmetric(const Size idx, ArrayView< const Size > neighs, ArrayView< const Vector > grads)
Evaluates all held derivatives symetrically for given particle pairs.
void eval(const Size idx, ArrayView< const Size > neighs, ArrayView< const Vector > grads)
Evaluates all held derivatives for given particle.
INLINE Accumulated & getAccumulated()
bool isSymmetric() const
Returns true if all stored derivatives are symmetric.
INLINE Size getDerivativeCnt() const
virtual void initialize(const Storage &input)
Initialize derivatives before loop.
Extension of derivative allowing to compute pair-wise acceleration for each neighbour.
virtual void evalAcceleration(const Size idx, ArrayView< const Size > neighs, ArrayView< const Vector > grads, ArrayView< Vector > dv)=0
Computes the pair-wise accelerations of given particle and its neighbours.
Derivative accumulated by summing up neighbouring particles.
virtual bool equals(const IDerivative &other) const
Returns true if this derivative is equal to the given derivative.
virtual DerivativePhase phase() const =0
Returns the phase of the derivative.
virtual void create(Accumulated &results)=0
Emplace all needed buffers into shared storage.
virtual void evalNeighs(const Size idx, ArrayView< const Size > neighs, ArrayView< const Vector > grads)=0
Compute derivatives of given particle.
virtual void initialize(const Storage &input, Accumulated &results)=0
Initialize derivative before iterating over neighbours.
Extension of derivative, allowing a symmetrized evaluation.
virtual DerivativePhase phase() const final
Symmetric derivatives are always in EVALUATION phase.
virtual void evalSymmetric(const Size idx, ArrayView< const Size > neighs, ArrayView< const Vector > grads)=0
Compute a part of derivatives from interaction of particle pairs.
Container storing all quantities used within the simulations.
Generic storage and input/output routines of settings.
Base class for all polymorphic objects.