157 {
158 using DESCRIPTOR = typename CELL::descriptor_t;
159 const auto q = x_b.template getFieldPointer<descriptors::BOUZIDI_DISTANCE>();
160 const auto veloCoeff = x_b.template getFieldPointer<descriptors::BOUZIDI_VELOCITY>();
161 for (int iPop=1; iPop < descriptors::q<DESCRIPTOR>(); ++iPop) {
162
163 if (q[iPop] > 0) {
164 const auto c = descriptors::c<DESCRIPTOR>(iPop);
165 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
166 auto x_s = x_b.neighbor(c);
167 auto x_f = x_b.neighbor(descriptors::c<DESCRIPTOR>(iPop_opposite));
168 auto veloTerm = veloCoeff[iPop] * (descriptors::t<V,DESCRIPTOR>(iPop)) * (descriptors::invCs2<V,DESCRIPTOR>());
169
170 x_b[iPop_opposite] = (
q[iPop] <= V{0.5})
171 * (V{2} *
q[iPop] * x_s[iPop] + (V{1} - V{2} *
q[iPop]) * x_b[iPop] - V{2} * veloTerm)
172 + (q[iPop] > V{0.5})
173 * (V{0.5} /
q[iPop] * x_s[iPop] + V{0.5} * (V{2} *
q[iPop] - V{1}) / q[iPop] * x_f[iPop_opposite] - V{1}/
q[iPop] * veloTerm);
174 }
175
176 else if (q[iPop] == V{0}) {
177 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
178 auto veloTerm = veloCoeff[iPop] * (descriptors::t<V,DESCRIPTOR>(iPop)) * (descriptors::invCs2<V,DESCRIPTOR>());
179 x_b[iPop_opposite] = x_b[iPop] - V{2} * veloTerm;
180 }
181 }
182 }
platform_constant int c[Q][D]
constexpr int q() any_platform