OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::Dynamics< T, DESCRIPTOR > Struct Template Referenceabstract

Interface for per-cell dynamics. More...

#include <interface.h>

+ Inheritance diagram for olb::Dynamics< T, DESCRIPTOR >:
+ Collaboration diagram for olb::Dynamics< T, DESCRIPTOR >:

Public Types

using value_t = T
 
using descriptor_t = DESCRIPTOR
 

Public Member Functions

virtual ~Dynamics () any_platform
 
virtual std::type_index id ()=0
 Expose unique type-identifier for RTTI.
 
virtual std::string getName () const
 Return human-readable name.
 
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 T, typename DESCRIPTOR>
struct olb::Dynamics< T, DESCRIPTOR >

Interface for per-cell dynamics.

Definition at line 54 of file interface.h.

Member Typedef Documentation

◆ descriptor_t

template<typename T , typename DESCRIPTOR >
using olb::Dynamics< T, DESCRIPTOR >::descriptor_t = DESCRIPTOR

Definition at line 56 of file interface.h.

◆ value_t

template<typename T , typename DESCRIPTOR >
using olb::Dynamics< T, DESCRIPTOR >::value_t = T

Definition at line 55 of file interface.h.

Constructor & Destructor Documentation

◆ ~Dynamics()

template<typename T , typename DESCRIPTOR >
virtual olb::Dynamics< T, DESCRIPTOR >::~Dynamics ( )
inlinevirtual

Definition at line 58 of file interface.h.

58{ }

Member Function Documentation

◆ collide()

template<typename T , typename DESCRIPTOR >
virtual CellStatistic< T > olb::Dynamics< T, DESCRIPTOR >::collide ( Cell< T, DESCRIPTOR > & cell)
inlinevirtual

Perform purely-local collision step on Cell interface (legacy, to be deprecated)

Reimplemented in olb::ForcedEntropicEqDynamics< T, DESCRIPTOR, MOMENTA >, olb::ForcedEntropicDynamics< T, DESCRIPTOR, MOMENTA >, olb::opti::DualForcedBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::opti::DualPorousBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::RtlbmDiffuseBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >, olb::RtlbmDiffuseEdgeBoundaryDynamics< T, DESCRIPTOR, MOMENTA, plane, normal1, normal2 >, olb::RtlbmDiffuseCornerBoundaryDynamics< T, DESCRIPTOR, MOMENTA, xNormal, yNormal, zNormal >, olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >, olb::RtlbmDiffuseConstEdgeBoundaryDynamics< T, DESCRIPTOR, MOMENTA, plane, normal1, normal2 >, olb::RtlbmDiffuseConstCornerBoundaryDynamics< T, DESCRIPTOR, MOMENTA, xNormal, yNormal, zNormal >, olb::RtlbmDirectedBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >, olb::RtlbmDirectedEdgeBoundaryDynamics< T, DESCRIPTOR, MOMENTA, plane, normal1, normal2 >, olb::RtlbmDirectedCornerBoundaryDynamics< T, DESCRIPTOR, MOMENTA, xNormal, yNormal, zNormal >, olb::EntropicEqDynamics< T, DESCRIPTOR, MOMENTA >, olb::EntropicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >, and olb::PorousAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >.

Definition at line 74 of file interface.h.

74 {
75 throw std::bad_function_call();
76 };
+ Here is the caller graph for this function:

◆ computeAllMomenta()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::computeAllMomenta ( ConstCell< T, DESCRIPTOR > & cell,
T & rho,
T u[DESCRIPTOR::d],
T pi[util::TensorVal< DESCRIPTOR >::n] ) const
pure virtual

◆ computeEquilibrium()

template<typename T , typename DESCRIPTOR >
virtual T olb::Dynamics< T, DESCRIPTOR >::computeEquilibrium ( int iPop,
T rho,
const T u[DESCRIPTOR::d] ) const
pure virtual

Return iPop equilibrium for given first and second momenta.

Implemented in olb::opti::DualForcedBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::opti::DualPorousBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, olb::RtlbmDiffuseBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >, olb::RtlbmDiffuseEdgeBoundaryDynamics< T, DESCRIPTOR, MOMENTA, plane, normal1, normal2 >, olb::RtlbmDiffuseCornerBoundaryDynamics< T, DESCRIPTOR, MOMENTA, xNormal, yNormal, zNormal >, olb::RtlbmDiffuseConstBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >, olb::RtlbmDiffuseConstEdgeBoundaryDynamics< T, DESCRIPTOR, MOMENTA, plane, normal1, normal2 >, olb::RtlbmDiffuseConstCornerBoundaryDynamics< T, DESCRIPTOR, MOMENTA, xNormal, yNormal, zNormal >, olb::RtlbmDirectedBoundaryDynamics< T, DESCRIPTOR, MOMENTA, direction, orientation >, olb::RtlbmDirectedEdgeBoundaryDynamics< T, DESCRIPTOR, MOMENTA, plane, normal1, normal2 >, olb::RtlbmDirectedCornerBoundaryDynamics< T, DESCRIPTOR, MOMENTA, xNormal, yNormal, zNormal >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::AdvectionDiffusionBulkTuple >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::BulkTuple >, olb::PorousAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::ForcedPSMBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, and olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >.

+ Here is the caller graph for this function:

◆ computeJ()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::computeJ ( ConstCell< T, DESCRIPTOR > & cell,
T j[DESCRIPTOR::d] ) const
pure virtual

◆ computeRho()

template<typename T , typename DESCRIPTOR >
virtual T olb::Dynamics< T, DESCRIPTOR >::computeRho ( ConstCell< T, DESCRIPTOR > & cell) const
pure virtual

◆ computeRhoU()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::computeRhoU ( ConstCell< T, DESCRIPTOR > & cell,
T & rho,
T u[DESCRIPTOR::d] ) const
pure virtual

◆ computeStress()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::computeStress ( ConstCell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
T pi[util::TensorVal< DESCRIPTOR >::n] ) const
pure virtual

◆ computeU()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::computeU ( ConstCell< T, DESCRIPTOR > & cell,
T u[DESCRIPTOR::d] ) const
pure virtual

◆ defineAllMomenta()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::defineAllMomenta ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
const T pi[util::TensorVal< DESCRIPTOR >::n] )
pure virtual

◆ defineRho()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::defineRho ( Cell< T, DESCRIPTOR > & cell,
T rho )
pure virtual

◆ defineRhoU()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::defineRhoU ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d] )
pure virtual

◆ defineU()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::defineU ( Cell< T, DESCRIPTOR > & cell,
const T u[DESCRIPTOR::d] )
pure virtual

◆ getName()

template<typename T , typename DESCRIPTOR >
virtual std::string olb::Dynamics< T, DESCRIPTOR >::getName ( ) const
inlinevirtual

◆ getParameters()

template<typename T , typename DESCRIPTOR >
virtual AbstractParameters< T, DESCRIPTOR > & olb::Dynamics< T, DESCRIPTOR >::getParameters ( BlockLattice< T, DESCRIPTOR > & block)
pure virtual

Parameters access for legacy post processors.

Implemented in olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, olb::ForcedVANSBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::AdvectionDiffusionBulkTuple >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::BulkTuple >, olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >, and olb::ForcedPSMBGKdynamics< T, DESCRIPTOR, MOMENTA >.

+ Here is the caller graph for this function:

◆ id()

template<typename T , typename DESCRIPTOR >
virtual std::type_index olb::Dynamics< T, DESCRIPTOR >::id ( )
pure virtual

Expose unique type-identifier for RTTI.

Implemented in olb::AdvectionDiffusionBoundariesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::AdvectionDiffusionEdgesDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, plane, normal1, normal2 >, olb::AdvectionDiffusionCornerDynamics2D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal >, olb::AdvectionDiffusionCornerDynamics3D< T, DESCRIPTOR, DYNAMICS, MOMENTA, xNormal, yNormal, zNormal >, olb::ZouHeDynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA, direction, orientation >, olb::CombinedAdvectionDiffusionRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::SourcedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::SourcedLimitedAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::TotalEnthalpyAdvectionDiffusionTRTdynamics< T, DESCRIPTOR, MOMENTA >, olb::PhaseFieldAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::ParticleAdvectionDiffusionBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::CombinedRLBdynamics< T, DESCRIPTOR, DYNAMICS, MOMENTA >, olb::ZeroDistributionDynamics< T, DESCRIPTOR >, olb::ForcedVANSBGKdynamics< T, DESCRIPTOR, MOMENTA >, olb::dynamics::Tuple< T, DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION, COMBINATION_RULE >, olb::dynamics::ParameterFromCell< PARAMETER, DYNAMICS >, olb::legacy::BasicDynamics< T, DESCRIPTOR, MOMENTA >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::AdvectionDiffusionBulkTuple >, olb::legacy::BasicDynamics< T, DESCRIPTOR, momenta::BulkTuple >, olb::legacy::NoLatticeDynamics< T, DESCRIPTOR >, olb::legacy::OffDynamics< T, DESCRIPTOR >, and olb::ForcedPSMBGKdynamics< T, DESCRIPTOR, MOMENTA >.

+ Here is the caller graph for this function:

◆ iniEquilibrium()

template<typename T , typename DESCRIPTOR >
void olb::Dynamics< T, DESCRIPTOR >::iniEquilibrium ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d] )
inline

Initialize to equilibrium distribution.

Definition at line 106 of file interface.h.

106 {
107 T rhoShift(rho);
108 T uShift[DESCRIPTOR::d];
109 util::copyN(uShift, u, DESCRIPTOR::d);
110 inverseShiftRhoU(cell, rhoShift, uShift);
111 for (unsigned iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
112 cell[iPop] = computeEquilibrium(iPop, rhoShift, uShift);
113 }
114 };
void copyN(T c[], const T a[], const unsigned dim) any_platform
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.
Definition interface.h:125
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.

References olb::Dynamics< T, DESCRIPTOR >::computeEquilibrium(), olb::util::copyN(), and olb::Dynamics< T, DESCRIPTOR >::inverseShiftRhoU().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iniRegularized()

template<typename T , typename DESCRIPTOR >
void olb::Dynamics< T, DESCRIPTOR >::iniRegularized ( Cell< T, DESCRIPTOR > & cell,
T rho,
const T u[DESCRIPTOR::d],
const T pi[util::TensorVal< DESCRIPTOR >::n] )
inline

Initialize cell to equilibrium and non-equilibrum part.

Definition at line 116 of file interface.h.

117 {
118 iniEquilibrium(cell, rho, u);
119 for (unsigned iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
120 cell[iPop] += equilibrium<DESCRIPTOR>::template fromPiToFneq<T>(iPop, pi);
121 }
122 };
void iniEquilibrium(Cell< T, DESCRIPTOR > &cell, T rho, const T u[DESCRIPTOR::d])
Initialize to equilibrium distribution.
Definition interface.h:106

References olb::Dynamics< T, DESCRIPTOR >::iniEquilibrium().

+ Here is the call graph for this function:

◆ initialize()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::initialize ( Cell< T, DESCRIPTOR > & cell)
inlinevirtual

◆ inverseShiftRhoU()

template<typename T , typename DESCRIPTOR >
virtual void olb::Dynamics< T, DESCRIPTOR >::inverseShiftRhoU ( ConstCell< T, DESCRIPTOR > & cell,
T & rho,
T u[DESCRIPTOR::d] ) const
inlinevirtual

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