OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS > Struct Template Referencefinal

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

#include <interface.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 parameters = typename DYNAMICS::parameters
 
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< T, DESCRIPTOR >
using value_t = T
 
using descriptor_t = DESCRIPTOR
 

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

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 interface.h:361

Definition at line 357 of file interface.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 363 of file interface.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 370 of file interface.h.

◆ MomentaF

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

Definition at line 365 of file interface.h.

◆ parameters

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

Definition at line 367 of file interface.h.

◆ value_t

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

Definition at line 362 of file interface.h.

Member Function Documentation

◆ apply()

template<typename PARAMETER , typename DYNAMICS >
template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 382 of file interface.h.

382 {
383 parameters.template set<PARAMETER>(
384 cell.template getField<PARAMETER>());
385 return DYNAMICS().apply(cell, parameters);
386 };
typename DYNAMICS::parameters parameters
Definition interface.h:367

◆ computeEquilibrium()

template<typename PARAMETER , typename DYNAMICS >
value_t olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >::computeEquilibrium ( int iPop,
value_t rho,
const value_t u[descriptor_t::d] ) const
inlineoverride

Definition at line 388 of file interface.h.

388 {
389 return DYNAMICS().computeEquilibrium(iPop, rho, u);
390 };

◆ getName()

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

Return human-readable name.

Reimplemented from olb::Dynamics< T, DESCRIPTOR >.

Definition at line 392 of file interface.h.

392 {
393 return "ParameterFromCell<" + DYNAMICS().getName() + ">";
394 };

◆ getParameters()

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

Definition at line 377 of file interface.h.

377 {
378 return block.template getData<OperatorParameters<ParameterFromCell>>();
379 }

◆ 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< T, DESCRIPTOR >.

Definition at line 372 of file interface.h.

372 {
373 return typeid(ParameterFromCell);
374 };

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