SPH
Public Member Functions | List of all members
IAcceleration Class Referenceabstract

Extension of derivative allowing to compute pair-wise acceleration for each neighbour. More...

#include <Derivative.h>

Inheritance diagram for IAcceleration:
ISymmetricDerivative IDerivative Polymorphic AccelerationTemplate< Derivative< Discr > > AccelerationTemplate< CohesionDerivative > AccelerationTemplate< Derivative > AccelerationTemplate< StressDivergence< Discr > > AccelerationTemplate< PressureGradient< Discr > > AccelerationTemplate< TDerived > StressAV::Derivative< Discr > CohesionDerivative MorrisMonaghanAV::Derivative RiemannAV::Derivative StandardAV::Derivative StressDivergence< Discr > PressureGradient< Discr >

Public Member Functions

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. More...
 
- Public Member Functions inherited from ISymmetricDerivative
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. More...
 
virtual DerivativePhase phase () const final
 Symmetric derivatives are always in EVALUATION phase. More...
 
- Public Member Functions inherited from IDerivative
virtual void create (Accumulated &results)=0
 Emplace all needed buffers into shared storage. More...
 
virtual void initialize (const Storage &input, Accumulated &results)=0
 Initialize derivative before iterating over neighbours. More...
 
virtual void evalNeighs (const Size idx, ArrayView< const Size > neighs, ArrayView< const Vector > grads)=0
 Compute derivatives of given particle. More...
 
virtual bool equals (const IDerivative &other) const
 Returns true if this derivative is equal to the given derivative. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Extension of derivative allowing to compute pair-wise acceleration for each neighbour.

Any derivative modifying acceleration of particles must implement this interface in order to work properly with EnergyConservingSolver. If different solver is used, it is sufficient the base classes.

Definition at line 124 of file Derivative.h.

Member Function Documentation

◆ evalAcceleration()

virtual void IAcceleration::evalAcceleration ( const Size  idx,
ArrayView< const Size neighs,
ArrayView< const Vector grads,
ArrayView< Vector dv 
)
pure virtual

Computes the pair-wise accelerations of given particle and its neighbours.

If the implementation of evalNeighs and evalNeighs also modify other quantity derivatives besides accelerations, this function shall also modify these in order to be consistent. Here, the evaluation is asymmetric, so the call of evalAcceleration should have the same effect as evalNeighs for all quantities except accelerations and energy derivative. Implementation may (but does not have to) modify energy derivatives arbitrarily; they are later overriden by EnergyConservingSolver anyway.

To ensure the computation of accelerations is internally consistent with other methods of derivative evaluation, consider using AccelerationTemplate helper class.

Parameters
idxIndex of first interacting particle.
neighsArray containing all neighbours of idx-th particle.
gradsComputed gradients of the SPH kernel for each particle pair.
dvOutput view, where the pair-wise accelerations are stored.

Implemented in AccelerationTemplate< TDerived >, AccelerationTemplate< Derivative< Discr > >, AccelerationTemplate< CohesionDerivative >, AccelerationTemplate< Derivative >, AccelerationTemplate< StressDivergence< Discr > >, and AccelerationTemplate< PressureGradient< Discr > >.


The documentation for this class was generated from the following file: