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

Container holding equation terms. More...

#include <EquationTerm.h>

Public Member Functions

 EquationHolder ()=default
 
 EquationHolder (const SharedPtr< IEquationTerm > &term)
 
EquationHolderoperator+= (const EquationHolder &other)
 
EquationHolder operator+ (const EquationHolder &other) const
 
template<typename Term >
bool contains () const
 Checks if the holder contains term of given type. More...
 
void setDerivatives (DerivativeHolder &derivatives, const RunSettings &settings) const
 Calls EquationTerm::setDerivatives for all stored equation terms. More...
 
void initialize (IScheduler &scheduler, Storage &storage, const Float t)
 Calls EquationTerm::initialize for all stored equation terms. More...
 
void finalize (IScheduler &scheduler, Storage &storage, const Float t)
 Calls EquationTerm::finalize for all stored equation terms. More...
 
void create (Storage &storage, IMaterial &material) const
 Calls EquationTerm::create for all stored equation terms. More...
 
Size getTermCnt () const
 

Detailed Description

Container holding equation terms.

Holds an array of equation terms. The object also defines operators for adding more equation terms and functions initialize, finalize and create, calling corresponding functions for all stored equation terms. Equation terms are stored as shared pointers and can be thus used in multiple EquationHolders. It is however not recommended to access the same term concurrently as it can contain a state.

Definition at line 238 of file EquationTerm.h.

Constructor & Destructor Documentation

◆ EquationHolder() [1/2]

EquationHolder::EquationHolder ( )
default

◆ EquationHolder() [2/2]

EquationHolder::EquationHolder ( const SharedPtr< IEquationTerm > &  term)
inlineexplicit

Definition at line 245 of file EquationTerm.h.

Member Function Documentation

◆ contains()

template<typename Term >
bool EquationHolder::contains ( ) const
inline

Checks if the holder contains term of given type.

Definition at line 265 of file EquationTerm.h.

◆ create()

void EquationHolder::create ( Storage storage,
IMaterial material 
) const
inline

Calls EquationTerm::create for all stored equation terms.

Definition at line 300 of file EquationTerm.h.

◆ finalize()

void EquationHolder::finalize ( IScheduler scheduler,
Storage storage,
const Float  t 
)
inline

Calls EquationTerm::finalize for all stored equation terms.

The order is reversed compared to initialize call.

Definition at line 293 of file EquationTerm.h.

◆ getTermCnt()

Size EquationHolder::getTermCnt ( ) const
inline

Definition at line 306 of file EquationTerm.h.

◆ initialize()

void EquationHolder::initialize ( IScheduler scheduler,
Storage storage,
const Float  t 
)
inline

Calls EquationTerm::initialize for all stored equation terms.

Definition at line 284 of file EquationTerm.h.

◆ operator+()

EquationHolder EquationHolder::operator+ ( const EquationHolder other) const
inline

Definition at line 256 of file EquationTerm.h.

◆ operator+=()

EquationHolder& EquationHolder::operator+= ( const EquationHolder other)
inline

Definition at line 251 of file EquationTerm.h.

◆ setDerivatives()

void EquationHolder::setDerivatives ( DerivativeHolder derivatives,
const RunSettings settings 
) const
inline

Calls EquationTerm::setDerivatives for all stored equation terms.

Definition at line 277 of file EquationTerm.h.


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