OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::collision::AdvectionDiffusionRLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > Struct Template Reference

#include <collision.h>

+ Collaboration diagram for olb::collision::AdvectionDiffusionRLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >:

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>
 

Public Member Functions

template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Detailed Description

template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct olb::collision::AdvectionDiffusionRLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 118 of file collision.h.

Member Typedef Documentation

◆ EquilibriumF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::AdvectionDiffusionRLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>

Definition at line 120 of file collision.h.

◆ MomentaF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::AdvectionDiffusionRLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 119 of file collision.h.

Member Function Documentation

◆ apply()

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::collision::AdvectionDiffusionRLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 123 of file collision.h.

123 {
124 V fEq[DESCRIPTOR::q] { };
125 const auto statistic = EquilibriumF().compute(cell, parameters, fEq);
126 V j1[DESCRIPTOR::d] { };
127 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop ) {
128 for (int iD=0; iD < DESCRIPTOR::d; ++iD ) {
129 j1[iD] += descriptors::c<DESCRIPTOR>(iPop,iD) * (cell[iPop] - fEq[iPop]);
130 }
131 }
132 const V omega = parameters.template get<descriptors::OMEGA>();
133 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop ) {
134 V fNeq{};
135 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
136 fNeq += descriptors::c<DESCRIPTOR>(iPop,iD) * j1[iD];
137 }
138 fNeq *= descriptors::t<V,DESCRIPTOR>(iPop) * descriptors::invCs2<V,DESCRIPTOR>();
139 cell[iPop] = fEq[iPop] + (V{1} - omega) * fNeq;
140 }
141 return statistic;
142 };
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
Definition collision.h:120
typename meta::list< descriptors::OMEGA > parameters
Definition collision.h:111

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