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.
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
CellStatistic< V > compute(CELL &cell, RHO &rho, U &u, FEQ &fEq) any_platform
References olb::forcing::ShanChen::VelocityShiftedEquilibrium< EQUILIBRIUM >::type< DESCRIPTOR, MOMENTA >::compute().
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 }
482 return {rho, uSqr};
483 };
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF