template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM, typename COLLISION>
struct olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >
Definition at line 90 of file forcing.h.
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
Definition at line 98 of file forcing.h.
98 {
99 const auto u = cell.template getField<descriptors::VELOCITY>();
100 const V rho =
MomentaF().computeRho(cell);
102 const V omega = parameters.template get<descriptors::OMEGA>();
103 const auto source = cell.template getField<descriptors::SOURCE>();
104 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
105 V sourceTerm{};
106 sourceTerm = source;
108 sourceTerm *= (V{1} - omega * V{0.5});
109 cell[iPop] += sourceTerm;
110 }
112 };
constexpr T t(unsigned iPop, tag::CUM) any_platform
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
typename MOMENTA::template type< DESCRIPTOR > MomentaF
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
References olb::util::normSqr(), and olb::descriptors::t().