OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS > Struct Template Referencefinal

Set PARAMETER of DYNAMICS from CELL (for CustomCollision-based DYNAMICS) More...

#include <modifiers.h>

+ Inheritance diagram for olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >:
+ Collaboration diagram for olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >:

Public Types

using value_t = typename DYNAMICS::value_t
 
using descriptor_t = typename DYNAMICS::descriptor_t
 
using MomentaF = typename DYNAMICS::MomentaF
 
using EquilibriumF = typename DYNAMICS::EquilibriumF
 
using parameters = typename DYNAMICS::parameters
 
template<typename NEW_T >
using exchange_value_type = ParameterFromCell<PARAMETER,typename DYNAMICS::template exchange_value_type<NEW_T>>
 
template<typename M >
using exchange_momenta = ParameterFromCell<PARAMETER,typename DYNAMICS::template exchange_momenta<M>>
 
- Public Types inherited from olb::dynamics::CustomCollision< DYNAMICS::value_t, DYNAMICS::descriptor_t, DYNAMICS::MomentaF::abstract >
using value_t
 
using descriptor_t
 
using MomentaF
 
- Public Types inherited from olb::Dynamics< DYNAMICS::value_t, DYNAMICS::descriptor_t >
using value_t
 
using descriptor_t
 

Public Member Functions

std::type_index id () override
 Expose unique type-identifier for RTTI.
 
AbstractParameters< value_t, descriptor_t > & getParameters (BlockLattice< value_t, descriptor_t > &block) override
 Parameters access for legacy post processors.
 
template<concepts::Cell CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > collide (CELL &cell, PARAMETERS &parameters) any_platform
 
void computeEquilibrium (ConstCell< value_t, descriptor_t > &cell, value_t rho, const value_t u[descriptor_t::d], value_t fEq[descriptor_t::q]) const override
 
std::string getName () const override
 Return human-readable name.
 
- Public Member Functions inherited from olb::dynamics::CustomCollision< DYNAMICS::value_t, DYNAMICS::descriptor_t, DYNAMICS::MomentaF::abstract >
void initialize (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell) override
 Initialize dynamics-specific data for cell.
 
DYNAMICS::value_t computeRho (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell) const override
 Compute particle density.
 
void computeU (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t u[DYNAMICS::descriptor_t::d]) const override
 Compute fluid velocity.
 
void computeJ (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t j[DYNAMICS::descriptor_t::d]) const override
 Compute fluid momentum.
 
void computeStress (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d], DYNAMICS::value_t pi[util::TensorVal< DYNAMICS::descriptor_t >::n]) const override
 Compute stress tensor.
 
void computeRhoU (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t &rho, DYNAMICS::value_t u[DYNAMICS::descriptor_t::d]) const override
 Compute fluid velocity and particle density.
 
void computeAllMomenta (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t &rho, DYNAMICS::value_t u[DYNAMICS::descriptor_t::d], DYNAMICS::value_t pi[util::TensorVal< DYNAMICS::descriptor_t >::n]) const override
 Compute all momenta up to second order.
 
void defineRho (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho) override
 Set particle density.
 
void defineU (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d]) override
 Set fluid velocity.
 
void defineRhoU (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d]) override
 Define fluid velocity and particle density.
 
void defineAllMomenta (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d], const DYNAMICS::value_t pi[util::TensorVal< DYNAMICS::descriptor_t >::n]) override
 Define all momenta up to second order.
 
void inverseShiftRhoU (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t &rho, DYNAMICS::value_t u[DYNAMICS::descriptor_t::d]) const override
 Calculate population momenta s.t. the physical momenta are reproduced by the computeRhoU.
 
- Public Member Functions inherited from olb::Dynamics< DYNAMICS::value_t, DYNAMICS::descriptor_t >
virtual ~Dynamics () any_platform
 
virtual CellStatistic< DYNAMICS::value_t > collide (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell)
 Perform purely-local collision step on Cell interface (legacy, to be deprecated)
 
virtual void computeEquilibrium (ConstCell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d], DYNAMICS::value_t fEq[DYNAMICS::descriptor_t::q]) const=0
 Return iPop equilibrium for given first and second momenta.
 
void iniEquilibrium (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d])
 Initialize to equilibrium distribution.
 
void iniRegularized (Cell< DYNAMICS::value_t, DYNAMICS::descriptor_t > &cell, DYNAMICS::value_t rho, const DYNAMICS::value_t u[DYNAMICS::descriptor_t::d], const DYNAMICS::value_t pi[util::TensorVal< DYNAMICS::descriptor_t >::n])
 Initialize cell to equilibrium and non-equilibrum part.
 

Detailed Description

template<typename PARAMETER, typename DYNAMICS>
struct olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >

Set PARAMETER of DYNAMICS from CELL (for CustomCollision-based DYNAMICS)

Allows for e.g. overriding DYNAMICS-wide relaxation frequency by per-cell values:

template <typename T, typename DESCRIPTOR>
using PerCellOmegaSourcedAdvectionDiffusionBGKdynamics = dynamics::ParameterFromCell<
>;
Set PARAMETER of DYNAMICS from CELL (for CustomCollision-based DYNAMICS)
Definition modifiers.h:48

Definition at line 44 of file modifiers.h.

Member Typedef Documentation

◆ descriptor_t

template<typename PARAMETER , typename DYNAMICS >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::descriptor_t = typename DYNAMICS::descriptor_t

Definition at line 50 of file modifiers.h.

◆ EquilibriumF

template<typename PARAMETER , typename DYNAMICS >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::EquilibriumF = typename DYNAMICS::EquilibriumF

Definition at line 53 of file modifiers.h.

◆ exchange_momenta

template<typename PARAMETER , typename DYNAMICS >
template<typename M >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::exchange_momenta = ParameterFromCell<PARAMETER,typename DYNAMICS::template exchange_momenta<M>>

Definition at line 61 of file modifiers.h.

◆ exchange_value_type

template<typename PARAMETER , typename DYNAMICS >
template<typename NEW_T >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::exchange_value_type = ParameterFromCell<PARAMETER,typename DYNAMICS::template exchange_value_type<NEW_T>>

Definition at line 58 of file modifiers.h.

◆ MomentaF

template<typename PARAMETER , typename DYNAMICS >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::MomentaF = typename DYNAMICS::MomentaF

Definition at line 52 of file modifiers.h.

◆ parameters

template<typename PARAMETER , typename DYNAMICS >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::parameters = typename DYNAMICS::parameters

Definition at line 55 of file modifiers.h.

◆ value_t

template<typename PARAMETER , typename DYNAMICS >
using olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::value_t = typename DYNAMICS::value_t

Definition at line 49 of file modifiers.h.

Member Function Documentation

◆ collide()

template<typename PARAMETER , typename DYNAMICS >
template<concepts::Cell CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::collide ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 73 of file modifiers.h.

73 {
74 parameters.template set<PARAMETER>(
75 cell.template getField<PARAMETER>());
76 return DYNAMICS().collide(cell, parameters);
77 };
typename DYNAMICS::parameters parameters
Definition modifiers.h:55

◆ computeEquilibrium()

template<typename PARAMETER , typename DYNAMICS >
void olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::computeEquilibrium ( ConstCell< value_t, descriptor_t > & cell,
value_t rho,
const value_t u[descriptor_t::d],
value_t fEq[descriptor_t::q] ) const
inlineoverride

Definition at line 79 of file modifiers.h.

79 {
80 DYNAMICS().computeEquilibrium(cell, rho, u, fEq);
81 };

◆ getName()

template<typename PARAMETER , typename DYNAMICS >
std::string olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::getName ( ) const
inlineoverridevirtual

Return human-readable name.

Reimplemented from olb::Dynamics< DYNAMICS::value_t, DYNAMICS::descriptor_t >.

Definition at line 83 of file modifiers.h.

83 {
84 return "ParameterFromCell<" + DYNAMICS().getName() + ">";
85 };

◆ getParameters()

template<typename PARAMETER , typename DYNAMICS >
AbstractParameters< value_t, descriptor_t > & olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::getParameters ( BlockLattice< value_t, descriptor_t > & block)
inlineoverridevirtual

Parameters access for legacy post processors.

Implements olb::Dynamics< DYNAMICS::value_t, DYNAMICS::descriptor_t >.

Definition at line 68 of file modifiers.h.

68 {
69 return block.template getData<OperatorParameters<ParameterFromCell>>();
70 }

◆ id()

template<typename PARAMETER , typename DYNAMICS >
std::type_index olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::id ( )
inlineoverridevirtual

Expose unique type-identifier for RTTI.

Implements olb::Dynamics< DYNAMICS::value_t, DYNAMICS::descriptor_t >.

Definition at line 63 of file modifiers.h.

63 {
64 return typeid(ParameterFromCell);
65 };

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