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

#include <collision.h>

+ Collaboration diagram for olb::collision::RLB::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::RLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 86 of file collision.h.

Member Typedef Documentation

◆ EquilibriumF

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

Definition at line 88 of file collision.h.

◆ MomentaF

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

Definition at line 87 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::RLB::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 91 of file collision.h.

91 {
93 MomentaF().computeStress(cell, pi);
94 V fEq[DESCRIPTOR::q] { };
95 const auto statistic = EquilibriumF().compute(cell, parameters, fEq);
96 const V omega = parameters.template get<descriptors::OMEGA>();
97 cell[0] = fEq[0] + (V{1} - omega) * equilibrium<DESCRIPTOR>::template fromPiToFneq<V>(0, pi);
98 for (int iPop=1; iPop <= DESCRIPTOR::q/2; ++iPop) {
99 cell[iPop] = fEq[iPop];
100 cell[iPop+DESCRIPTOR::q/2] = fEq[iPop+DESCRIPTOR::q/2];
101 V fNeq = (V{1} - omega) * equilibrium<DESCRIPTOR>::template fromPiToFneq<V>(iPop, pi);
102 cell[iPop] += fNeq;
103 cell[iPop+DESCRIPTOR::q/2] += fNeq;
104 }
105 return statistic;
106 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition collision.h:87
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
Definition collision.h:88
typename meta::list< descriptors::OMEGA > parameters
Definition collision.h:79
static constexpr int n
result stored in n
Definition util.h:211

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