OpenLB 1.8.1
Loading...
Searching...
No Matches
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 CELL , typename RHO , typename U , typename FEQ , typename V = typename CELL::value_t>
CellStatistic< V > compute (CELL &cell, RHO &rho, U &u, FEQ &fEq) 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 471 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 473 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 472 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 486 of file forcing.h.

486 {
487 V rho, u[DESCRIPTOR::d];
488 MomentaF().computeRhoU(cell, rho, u);
489 const auto force = cell.template getFieldPointer<descriptors::FORCE>();
490 for (int iVel=0; iVel<DESCRIPTOR::d; ++iVel) {
491 u[iVel] += force[iVel] / parameters.template get<descriptors::OMEGA>();
492 }
493 return compute(cell, rho, u, fEq);
494 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition forcing.h:472
CellStatistic< V > compute(CELL &cell, RHO &rho, U &u, FEQ &fEq) any_platform
Definition forcing.h:476

References olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >::compute().

+ Here is the call graph for this function:

◆ compute() [2/2]

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

Definition at line 476 of file forcing.h.

476 {
477 V uSqr{};
478 for (int iVel=0; iVel<DESCRIPTOR::d; ++iVel) {
479 uSqr += u[iVel] * u[iVel];
480 }
481 EquilibriumF().compute(cell, rho, u, fEq);
482 return {rho, uSqr};
483 };
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
Definition forcing.h:473
+ Here is the caller graph for this function:

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