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

#include <collisionMRT.h>

+ Collaboration diagram for olb::collision::MRT::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<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters)
 

Detailed Description

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

Definition at line 45 of file collisionMRT.h.

Member Typedef Documentation

◆ EquilibriumF

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

Definition at line 47 of file collisionMRT.h.

◆ MomentaF

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

Definition at line 46 of file collisionMRT.h.

Member Function Documentation

◆ apply()

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

Definition at line 50 of file collisionMRT.h.

50 {
51 const V omega = parameters.template get<descriptors::OMEGA>();
52
53 V rt[DESCRIPTOR::q] { }; // relaxation times vector.
54 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
55 rt[iPop] = descriptors::s<V,DESCRIPTOR>(iPop);
56 }
57 for (int iPop=0; iPop < descriptors::shearIndexes<DESCRIPTOR>(); ++iPop) {
58 rt[descriptors::shearViscIndexes<DESCRIPTOR>(iPop)] = omega;
59 }
60 V invM_S[DESCRIPTOR::q][DESCRIPTOR::q] { }; // relaxation times matrix
61 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
62 for (int jPop = 0; jPop < DESCRIPTOR::q; ++jPop) {
63 invM_S[iPop][jPop] = V{};
64 for (int kPop = 0; kPop < DESCRIPTOR::q; ++kPop) {
65 if (kPop == jPop) {
66 invM_S[iPop][jPop] += descriptors::invM<V,DESCRIPTOR>(iPop,kPop) * rt[kPop];
67 }
68 }
69 }
70 }
71
72 V rho, u[DESCRIPTOR::d];
73 MomentaF().computeRhoU(cell, rho, u);
74 V uSqr = mrt<DESCRIPTOR>::mrtCollision(cell, rho, u, invM_S);
75
76 return {rho, uSqr};
77 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
typename meta::list< descriptors::OMEGA > parameters
static V mrtCollision(CELL &cell, const RHO &rho, const U &u, const INVM_S &invM_S)
MRT collision step.
Definition mrt.h:88

References olb::mrt< DESCRIPTOR >::mrtCollision().

+ Here is the call graph for this function:

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