SPH
Public Member Functions | List of all members
ConstSmoothingLength Class Reference

Helper term to keep smoothing length constant during the simulation. More...

#include <EquationTerm.h>

Inheritance diagram for ConstSmoothingLength:
IEquationTerm Polymorphic

Public Member Functions

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

Detailed Description

Helper term to keep smoothing length constant during the simulation.

The smoothing length is currently stored as the 4th component of the position vectors. Because of that, it is necessary to either provide an equation evolving smoothing length in time (see AdaptiveSmoothingLength), or use this equation to set all derivatives of smoothing length to zero.

Attention
If neither of these equations are used and the smoothing length is not explicitly handled by the solver or timestepping, the behavior might by unexpected and possibly leads to errors. This issue will be resolved in the future.

Definition at line 219 of file EquationTerm.h.

Member Function Documentation

◆ create()

void ConstSmoothingLength::create ( Storage storage,
IMaterial material 
) const
overridevirtual

Creates all quantities needed by the term using given material.

Called once for every body in the simulation.

Implements IEquationTerm.

Definition at line 466 of file EquationTerm.cpp.

◆ finalize()

void ConstSmoothingLength::finalize ( IScheduler scheduler,
Storage storage,
const Float  t 
)
overridevirtual

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

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

Implements IEquationTerm.

Definition at line 457 of file EquationTerm.cpp.

◆ initialize()

void ConstSmoothingLength::initialize ( IScheduler scheduler,
Storage storage,
const Float  t 
)
overridevirtual

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

Implements IEquationTerm.

Definition at line 453 of file EquationTerm.cpp.

◆ setDerivatives()

void ConstSmoothingLength::setDerivatives ( DerivativeHolder derivatives,
const RunSettings settings 
)
overridevirtual

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.

Implements IEquationTerm.

Definition at line 450 of file EquationTerm.cpp.


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