110 {
111 using DESCRIPTOR = typename CELL::descriptor_t;
112 const auto q = x_b.template getFieldPointer<descriptors::BOUZIDI_DISTANCE>();
113 const auto phi_d = x_b.template getFieldPointer<descriptors::BOUZIDI_ADE_DIRICHLET>();
114 V f = V{1/3};
115 if (descriptors::q<DESCRIPTOR>() == 7) {
116 f = V{0.25};
117 }
118 for (int iPop = 1; iPop < descriptors::q<DESCRIPTOR>(); ++iPop) {
119
120 if (q[iPop] > V{0}) {
121 const auto c = descriptors::c<DESCRIPTOR>(iPop);
122 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
123 auto x_s = x_b.neighbor(c);
124 auto x_f = x_b.neighbor(descriptors::c<DESCRIPTOR>(iPop_opposite));
125 auto source_d = phi_d[iPop] * f;
126 auto t_i = descriptors::t<V,DESCRIPTOR>(iPop);
127 auto t_iopp = descriptors::t<V,DESCRIPTOR>(iPop_opposite);
128
129 x_b[iPop_opposite] = (
q[iPop] <= V{0.5})
130 * (V{-2} *
q[iPop] * (x_s[iPop] + t_i) + (V{2} *
q[iPop] - V{1}) * (x_b[iPop] + t_i) + source_d)
131 + (q[iPop] > V{0.5})
132 * (V{-1} / (V{2} *
q[iPop]) * (x_s[iPop] + t_i) + (V{1} - V{1} / (V{2} *
q[iPop])) * (x_f[iPop_opposite] + t_iopp) + (V{1} / (V{2} *
q[iPop])) * source_d)
133 - t_iopp;
134 }
135
136 else if (q[iPop] == V{0}) {
137 const int iPop_opposite = descriptors::opposite<DESCRIPTOR>(iPop);
138 auto source_d = phi_d[iPop] * f;
139 auto t_i = descriptors::t<V,DESCRIPTOR>(iPop);
140 auto t_iopp = descriptors::t<V,DESCRIPTOR>(iPop_opposite);
141 x_b[iPop_opposite] = -(x_b[iPop] + t_i) + source_d - t_iopp;
142 }
143 }
144 }
platform_constant int c[Q][D]
constexpr int q() any_platform