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

Represents a term or terms appearing in evolutionary equations. More...

#include <EquationTerm.h>

Inheritance diagram for IEquationTerm:
Polymorphic AdaptiveSmoothingLength ArtificialConductivity BalsaraSwitch< AV > ChaiScriptTerm CohesionTerm ConstSmoothingLength ContinuityEquation DeltaSph::DensityDiffusion DeltaSph::VelocityDiffusion DensityIndependentPressureForce DisplacementTerm ExternalForce< TFunctor > HeatDiffusionEquation InertialForce MorrisMonaghanAV NaiveViscosity NavierStokesForce NeighbourCountTerm PressureForce RadiativeCooling RiemannAV SimpleDamping SolidStressForce SphericalGravityEquation StandardAV StressAV SurfaceNormal Tests::SingleDerivativeMaker< TDerivative > ViscousStress XSph YorpSpinup

Public Member Functions

virtual void setDerivatives (DerivativeHolder &derivatives, const RunSettings &settings)=0
 Sets derivatives required by this term. More...
 
virtual void initialize (IScheduler &scheduler, Storage &storage, const Float t)=0
 Initialize all the derivatives and/or quantity values before derivatives are computed. More...
 
virtual void finalize (IScheduler &scheduler, Storage &storage, const Float t)=0
 Computes all the derivatives and/or quantity values based on accumulated derivatives. More...
 
virtual void create (Storage &storage, IMaterial &material) const =0
 Creates all quantities needed by the term using given material. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Represents a term or terms appearing in evolutionary equations.

Each EquationTerm either directly modifies quantities, or adds quantity derivatives. These terms never work directly with pairs of particles, instead they can register IDerivative that will be accumulated by the solver. EquationTerm can then access the result.

Definition at line 22 of file EquationTerm.h.

Member Function Documentation

◆ create()

virtual void IEquationTerm::create ( Storage storage,
IMaterial material 
) const
pure virtual

Creates all quantities needed by the term using given material.

Called once for every body in the simulation.

Implemented in DensityIndependentPressureForce, HeatDiffusionEquation, ViscousStress, ConstSmoothingLength, ContinuityEquation, NavierStokesForce, SolidStressForce, PressureForce, AdaptiveSmoothingLength, StressAV, MorrisMonaghanAV, and BalsaraSwitch< AV >.

◆ finalize()

virtual void IEquationTerm::finalize ( IScheduler scheduler,
Storage storage,
const Float  t 
)
pure virtual

Computes all the derivatives and/or quantity values based on accumulated derivatives.

Called every time step after derivatives are evaluated and saved to storage.

Implemented in ConstSmoothingLength, ContinuityEquation, NavierStokesForce, SolidStressForce, PressureForce, AdaptiveSmoothingLength, StressAV, and BalsaraSwitch< AV >.

◆ initialize()

virtual void IEquationTerm::initialize ( IScheduler scheduler,
Storage storage,
const Float  t 
)
pure virtual

Initialize all the derivatives and/or quantity values before derivatives are computed.

Called at the beginning of every time step. Note that derivatives need not be zeroed out manually, this is already done by timestepping (for derivatives of quantities) and solver (for accumulated values).

Implemented in ConstSmoothingLength, ContinuityEquation, NavierStokesForce, SolidStressForce, PressureForce, AdaptiveSmoothingLength, StressAV, and BalsaraSwitch< AV >.

◆ setDerivatives()

virtual void IEquationTerm::setDerivatives ( DerivativeHolder derivatives,
const RunSettings settings 
)
pure virtual

Sets derivatives required by this term.

The derivatives are then automatically evaluated by the solver, the equation term can access the result in finalize function. This function is called once for each thread at the beginning of the run.

Implemented in Tests::SingleDerivativeMaker< TDerivative >, DisplacementTerm, DensityIndependentPressureForce, XSph, SurfaceNormal, NeighbourCountTerm, HeatDiffusionEquation, SimpleDamping, ViscousStress, NaiveViscosity, CohesionTerm, ConstSmoothingLength, ContinuityEquation, NavierStokesForce, SolidStressForce, PressureForce, AdaptiveSmoothingLength, DeltaSph::VelocityDiffusion, DeltaSph::DensityDiffusion, StressAV, StandardAV, RiemannAV, MorrisMonaghanAV, ArtificialConductivity, and BalsaraSwitch< AV >.


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