591 {
592 constexpr auto onWallIndices = util::populationsContributingToVelocity<DESCRIPTOR,direction,0>();
593 constexpr auto normalIndices = util::populationsContributingToVelocity<DESCRIPTOR,direction,orientation>();
594
595 const V temp = TYPE().computeRho(cell);
596 const auto uNS = cell.template getField<descriptors::VELOCITY>();
597
598 V uOnWall[DESCRIPTOR::d] = { V{} };
599 for (unsigned fIndex=0; fIndex<onWallIndices.size(); ++fIndex) {
600 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
601 uOnWall[iD] += (cell[onWallIndices[fIndex]]
603 * descriptors::c<DESCRIPTOR>(onWallIndices[fIndex],iD);
604 }
605 }
606
607 V uNormal[DESCRIPTOR::d] = { V{} };
608 for (unsigned fIndex=0; fIndex<normalIndices.size(); ++fIndex) {
609 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
610 uNormal[iD] += (cell[normalIndices[fIndex]]
612 * descriptors::c<DESCRIPTOR>(normalIndices[fIndex],iD);
613 }
614 }
615
616 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
617 u[iD] = uOnWall[iD] + V(2) * uNormal[iD];
618 }
619 }
static V firstOrder(int iPop, const RHO &rho, const U &u) any_platform
Computation of equilibrium distribution, first order in u.