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

#include <forcing.h>

+ Collaboration diagram for olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >:

Public Types

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

Public Member Functions

template<typename RHO , typename U >
auto compute (int iPop, const RHO &rho, const U &u) any_platform
 
template<typename CELL , typename PARAMETERS , typename FEQ , typename V = typename CELL::value_t>
CellStatistic< V > compute (CELL &cell, PARAMETERS &parameters, FEQ &fEq) any_platform
 

Detailed Description

template<typename EQUILIBRIUM>
template<typename DESCRIPTOR, typename MOMENTA>
struct olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >

Definition at line 197 of file forcing.h.

Member Typedef Documentation

◆ EquilibriumF

template<typename EQUILIBRIUM >
template<typename DESCRIPTOR , typename MOMENTA >
using olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >::EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>

Definition at line 199 of file forcing.h.

◆ MomentaF

template<typename EQUILIBRIUM >
template<typename DESCRIPTOR , typename MOMENTA >
using olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 198 of file forcing.h.

Member Function Documentation

◆ compute() [1/2]

template<typename EQUILIBRIUM >
template<typename DESCRIPTOR , typename MOMENTA >
template<typename CELL , typename PARAMETERS , typename FEQ , typename V = typename CELL::value_t>
CellStatistic< V > olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >::compute ( CELL & cell,
PARAMETERS & parameters,
FEQ & fEq )
inline

Definition at line 207 of file forcing.h.

207 {
208 V rho, u[DESCRIPTOR::d], uSqr{};
209 MomentaF().computeRhoU(cell, rho, u);
210 const auto force = cell.template getFieldPointer<descriptors::FORCE>();
211 for (int iVel=0; iVel<DESCRIPTOR::d; ++iVel) {
212 u[iVel] += force[iVel] / parameters.template get<descriptors::OMEGA>();
213 uSqr += u[iVel] * u[iVel];
214 }
215 for (unsigned iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
216 fEq[iPop] = EquilibriumF().compute(iPop, rho, u);
217 }
218 return {rho, uSqr};
219 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition forcing.h:198
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
Definition forcing.h:199

◆ compute() [2/2]

template<typename EQUILIBRIUM >
template<typename DESCRIPTOR , typename MOMENTA >
template<typename RHO , typename U >
auto olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >::compute ( int iPop,
const RHO & rho,
const U & u )
inline

Definition at line 202 of file forcing.h.

202 {
203 return EquilibriumF().compute(iPop, rho, u);
204 }

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