217 {
218 V u[DESCRIPTOR::d];
221 const V omega = parameters.template get<descriptors::OMEGA>();
222 const auto force = cell.template getField<descriptors::FORCE>();
223 const auto rho = cell.template getField<descriptors::RHO>();
224 const auto gradRho = cell.template getField<descriptors::NABLARHO>();
225
226 V fTerm[DESCRIPTOR::q], fTermPlus[DESCRIPTOR::q], fTermMinus[DESCRIPTOR::q];
227
228 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
229 V c_u{};
230 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
232 }
233 fTerm[iPop] = 0.;
234 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
236 }
238 }
239
240 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
243 }
244
245 V tau = V{1} / omega;
246 const V tau2 = parameters.template get<collision::ITRT::TAU_MINUS>();
247 const auto nablaRho = cell.template getField<descriptors::NABLARHO>();
249 const V omega2 = V{1} / (tau + ratio * (tau2 - tau));
250
251 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
252 cell[iPop] += ( V{1} - omega * V{0.5} ) * fTermPlus[iPop]
253 + ( V{1} - omega2 * V{0.5} ) * fTermMinus[iPop];
254 }
255
257 };
constexpr T invCs2() any_platform
constexpr T t(unsigned iPop, tag::CUM) any_platform
constexpr int c(unsigned iPop, unsigned iDim) any_platform
constexpr int opposite(unsigned iPop) any_platform
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
T norm(const std::vector< T > &a)
l2 norm of a vector of arbitrary length
typename Forced< MOMENTA >::template type< DESCRIPTOR > MomentaF
typename COLLISION::template type< DESCRIPTOR, Forced< MOMENTA >, EQUILIBRIUM > CollisionO