SPH
|
#include <Derivative.h>
Public Member Functions | |
CorrectionTensor (const RunSettings &settings) | |
virtual void | create (Accumulated &results) override |
Emplace all needed buffers into shared storage. More... | |
virtual void | initialize (const Storage &input, Accumulated &results) override |
Initialize derivative before iterating over neighbours. More... | |
virtual void | evalNeighs (Size i, ArrayView< const Size > neighs, ArrayView< const Vector > grads) override |
Compute derivatives of given particle. More... | |
virtual DerivativePhase | phase () const override |
Returns the phase of the derivative. More... | |
Public Member Functions inherited from IDerivative | |
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 () |
Definition at line 149 of file Derivative.h.
|
explicit |
Definition at line 8 of file Derivative.cpp.
|
overridevirtual |
Emplace all needed buffers into shared storage.
Called only once at the beginning of the run.
Implements IDerivative.
Definition at line 17 of file Derivative.cpp.
|
overridevirtual |
Compute derivatives of given particle.
Derivatives are computed by summing up pair-wise interaction between the given particle and its neighbours. Derivatives of the neighbours should not be modified by the function. Note that the given particle is NOT included in its own neighbours.
idx | Index of the first interacting particle. |
neighs | Array containing all neighbours of idx-th particle. |
grads | Computed gradients of the SPH kernel for each particle pair. |
Implements IDerivative.
Definition at line 36 of file Derivative.cpp.
|
overridevirtual |
Initialize derivative before iterating over neighbours.
All pointers and arrayviews used to access storage quantities must be initialized in this function, as they may have been invalidated.
input | Storage containing all the input quantities from which derivatives are computed. This storage is shared for all threads. |
results | Thread-local storage where the computed derivatives are saved. |
Implements IDerivative.
Definition at line 22 of file Derivative.cpp.
|
overridevirtual |
Returns the phase of the derivative.
As long as the derivative does not depend on other derivatives, it shall return DerivativePhase::EVALUATION. Auxiliary derivatives, computing helper term that are later used for evaluation of other derivatives, belong to phase DerivativePhase::PRECOMPUTE.
Implements IDerivative.
Definition at line 12 of file Derivative.cpp.