SPH
Public Member Functions | List of all members
CorrectionTensor Class Referencefinal

#include <Derivative.h>

Inheritance diagram for CorrectionTensor:
IDerivative Polymorphic

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 ()
 

Detailed Description

Definition at line 149 of file Derivative.h.

Constructor & Destructor Documentation

◆ CorrectionTensor()

NAMESPACE_SPH_BEGIN CorrectionTensor::CorrectionTensor ( const RunSettings settings)
explicit

Definition at line 8 of file Derivative.cpp.

Member Function Documentation

◆ create()

void CorrectionTensor::create ( Accumulated results)
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.

◆ evalNeighs()

void CorrectionTensor::evalNeighs ( Size  idx,
ArrayView< const Size neighs,
ArrayView< const Vector grads 
)
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.

Parameters
idxIndex of the first interacting particle.
neighsArray containing all neighbours of idx-th particle.
gradsComputed gradients of the SPH kernel for each particle pair.

Implements IDerivative.

Definition at line 36 of file Derivative.cpp.

◆ initialize()

void CorrectionTensor::initialize ( const Storage input,
Accumulated results 
)
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.

Parameters
inputStorage containing all the input quantities from which derivatives are computed. This storage is shared for all threads.
resultsThread-local storage where the computed derivatives are saved.

Implements IDerivative.

Definition at line 22 of file Derivative.cpp.

◆ phase()

DerivativePhase CorrectionTensor::phase ( ) const
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.


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