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

#include <collision.h>

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

Definition at line 154 of file collision.h.

Member Typedef Documentation

◆ EquilibriumF

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

Definition at line 156 of file collision.h.

◆ MomentaF

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

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

Definition at line 159 of file collision.h.

159 {
160 V fEq[DESCRIPTOR::q];
161 const auto statistic = EquilibriumF().compute(cell, parameters, fEq);
162
163 V deltaRho = V{1} - parameters.template get<statistics::AVERAGE_RHO>();
164 V ratioRho = V{1} + deltaRho / statistic.rho;
165
166 const V omega = parameters.template get<descriptors::OMEGA>();
167
168 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
169 cell[iPop] = ratioRho * (fEq[iPop] + descriptors::t<V,DESCRIPTOR>(iPop))
170 - descriptors::t<V,DESCRIPTOR>(iPop)
171 + (V{1} - omega) * (cell[iPop] - fEq[iPop]);
172 }
173 return {statistic.rho+deltaRho, statistic.uSqr};
174 };
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
Definition collision.h:156
typename meta::list< descriptors::OMEGA, statistics::AVERAGE_RHO > parameters
Definition collision.h:147

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