flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
mac_bc.hpp
Go to the documentation of this file.
1
10#ifndef PECLET_FLOW_MAC_BC_HPP
11#define PECLET_FLOW_MAC_BC_HPP
12
13#include <Kokkos_Core.hpp>
14
15#include "policy.hpp"
16
17namespace peclet::flow {
18
19using BExec = Kokkos::DefaultExecutionSpace;
20using BMem = BExec::memory_space;
21using BField = Kokkos::View<double*, BMem>;
22
23struct B3 {
24 int x, y, z;
25};
26
27namespace bcdetail {
28KOKKOS_INLINE_FUNCTION void axisDims(B3 ext, int (&dims)[3], long (&strides)[3]) {
29 dims[0] = ext.x;
30 dims[1] = ext.y;
31 dims[2] = ext.z;
32 strides[0] = 1;
33 strides[1] = ext.x;
34 strides[2] = static_cast<long>(ext.x) * ext.y;
35}
36// One column of bcVelocityComp: the ghosts of component `comp` on face (axis a, side s) along the
37// column `at(ia)` (ia = the index along a, na = the extent along a), wall velocity `wc`.
38template <class At>
39KOKKOS_INLINE_FUNCTION void velFaceColumn(const At& at, int na, int g, int a, int s, int comp,
40 double wc, int fold) {
41 const int bf = (s == 0) ? g : (na - g);
42 if (comp == a) { // normal: Dirichlet face + odd reflection
43 at(bf) = wc;
44 if (s == 0)
45 for (int ia = 0; ia < g; ++ia)
46 at(ia) = 2.0 * wc - at(2 * bf - ia);
47 else
48 for (int ia = na - g + 1; ia < na; ++ia)
49 at(ia) = 2.0 * wc - at(2 * bf - ia);
50 } else if (fold) { // tangential implicit: drop wall face
51 if (s == 0)
52 for (int ia = 0; ia < g; ++ia)
53 at(ia) = 0.0;
54 else
55 for (int ia = na - g; ia < na; ++ia)
56 at(ia) = 0.0;
57 } else { // tangential explicit: cell-centred reflection about bf-0.5
58 if (s == 0)
59 for (int ia = 0; ia < g; ++ia)
60 at(ia) = 2.0 * wc - at(2 * bf - 1 - ia);
61 else
62 for (int ia = na - g; ia < na; ++ia)
63 at(ia) = 2.0 * wc - at(2 * bf - 1 - ia);
64 }
65}
66} // namespace bcdetail
67
68// Fill component comp (0=u,1=v,2=w) ghosts for one domain face (axis a, side s=0 low/1 high) with a
69// scalar wall velocity. fold=1 drops the tangential wall face (ghost=0, implicit diffusion).
70inline void bcVelocityComp(BField f, B3 ext, int g, int a, int s, int comp, double wall, int fold,
71 BField prof = BField(), int prof_nc = 0) {
73 int dims[3];
74 long strides[3];
76 const int b = (a + 1) % 3, c = (a + 2) % 3;
77 const long sa = strides[a], sb = strides[b], sc = strides[c];
78 const int na = dims[a];
79 const bool hasProf =
80 prof.extent(0) > 0; // per-position inlet profile (resampled to the face grid)
81 using MD = MDRange2<BExec>;
82 Kokkos::parallel_for(
83 "peclet::flow::bc_vel", MD(space, {0, 0}, {dims[b], dims[c]}), KOKKOS_LAMBDA(int p0, int p1) {
84 const long base = static_cast<long>(p0) * sb + static_cast<long>(p1) * sc;
85 const double wc = hasProf ? prof((static_cast<long>(p0) * prof_nc + p1) * 3 + comp) : wall;
86 auto at = [&](int ia) -> double& { return f(base + static_cast<long>(ia) * sa); };
87 bcdetail::velFaceColumn(at, na, g, a, s, comp, wc, fold);
88 });
89}
90
91// §14 H-3(e): up to six bcVelocityComp applications on ONE axis a -- (field, component, side, wall
92// velocity or inlet profile) -- in one launch over the face's perpendicular plane. Each column runs
93// the applications in table order, so for every field the faces keep their sequential order
94// (s = 0 before s = 1) and different fields are independent: bit-identical to the separate launches
95// in that order. The caller merges only faces whose ghost planes are disjoint (ext_a > 2g).
96struct BcVelFace {
97 BField f, prof; // the field; the resampled inlet profile (empty: the scalar `wall`)
98 double wall = 0.0;
99 int comp = 0, s = 0, profNc = 0;
100};
102 static constexpr int kMax = 6;
104 int n = 0;
105};
106inline void bcVelocityFaces(const BcVelFaces& J, B3 ext, int g, int a, int fold) {
107 BExec space;
108 int dims[3];
109 long strides[3];
111 const int b = (a + 1) % 3, c = (a + 2) % 3;
112 const long sa = strides[a], sb = strides[b], sc = strides[c];
113 const int na = dims[a];
114 using MD = MDRange2<BExec>;
115 Kokkos::parallel_for(
116 "peclet::flow::bc_vel", MD(space, {0, 0}, {dims[b], dims[c]}), KOKKOS_LAMBDA(int p0, int p1) {
117 const long base = static_cast<long>(p0) * sb + static_cast<long>(p1) * sc;
118 for (int k = 0; k < J.n; ++k) {
119 const BcVelFace& q = J.j[k];
120 const double wc = (q.prof.extent(0) > 0)
121 ? q.prof((static_cast<long>(p0) * q.profNc + p1) * 3 + q.comp)
122 : q.wall;
123 auto at = [&](int ia) -> double& { return q.f(base + static_cast<long>(ia) * sa); };
124 bcdetail::velFaceColumn(at, na, g, a, q.s, q.comp, wc, fold);
125 }
126 });
127}
128
129// FREE-SLIP / SYMMETRY face (BC type 4) for component comp on one domain face (staggered).
130// * normal component (comp == a): impermeable -- the boundary face is held at 0 and the ghosts
131// are the odd reflection about it, exactly the no-slip wall with wall velocity 0;
132// * tangential components: zero normal derivative. Explicit (fold=0): the EVEN reflection about
133// the face, ghost(ia) = inner(mirror) -- exact for any profile symmetric about the face, so a
134// half-channel with this face reproduces the full channel pointwise. Implicit (fold=1): the
135// face is dropped (ghost = 0) and setupBcDiffusion folds -beta onto the diagonal (the mirror
136// neighbour equals the cell itself, so the face's beta*(ghost - inner) vanishes) -- the same
137// fold the outflow's zero-gradient tangential treatment uses.
138inline void bcSlipComp(BField f, B3 ext, int g, int a, int s, int comp, int fold) {
139 if (comp == a) {
140 bcVelocityComp(f, ext, g, a, s, comp, 0.0, fold);
141 return;
142 }
143 BExec space;
144 int dims[3];
145 long strides[3];
147 const int b = (a + 1) % 3, c = (a + 2) % 3;
148 const long sa = strides[a], sb = strides[b], sc = strides[c];
149 const int na = dims[a];
150 const int bf = (s == 0) ? g : (na - g);
151 using MD = MDRange2<BExec>;
152 Kokkos::parallel_for(
153 "peclet::flow::bc_slip", MD(space, {0, 0}, {dims[b], dims[c]}),
154 KOKKOS_LAMBDA(int p0, int p1) {
155 const long base = static_cast<long>(p0) * sb + static_cast<long>(p1) * sc;
156 auto at = [&](int ia) -> double& { return f(base + static_cast<long>(ia) * sa); };
157 if (s == 0)
158 for (int ia = 0; ia < g; ++ia)
159 at(ia) = fold ? 0.0 : at(2 * bf - 1 - ia); // even reflection about bf-0.5
160 else
161 for (int ia = na - g; ia < na; ++ia)
162 at(ia) = fold ? 0.0 : at(2 * bf - 1 - ia);
163 });
164}
165
166// Even (mirror) reflection of a cell-centered field about one domain face: ghost(ia) =
167// inner(mirror). The collocated tangential free-slip ghost (a symmetric profile is reproduced
168// exactly, which bcNeumannGhost's copy of the boundary cell into every layer is not).
169inline void bcMirrorGhost(BField f, B3 ext, int g, int a, int s) {
170 BExec space;
171 int dims[3];
172 long strides[3];
174 const int b = (a + 1) % 3, c = (a + 2) % 3;
175 const long sa = strides[a], sb = strides[b], sc = strides[c];
176 const int na = dims[a];
177 using MD = MDRange2<BExec>;
178 Kokkos::parallel_for(
179 "peclet::flow::bc_mirror_ghost", MD(space, {0, 0}, {dims[b], dims[c]}),
180 KOKKOS_LAMBDA(int p0, int p1) {
181 const long base = static_cast<long>(p0) * sb + static_cast<long>(p1) * sc;
182 auto at = [&](int ia) -> double& { return f(base + static_cast<long>(ia) * sa); };
183 if (s == 0)
184 for (int ia = 0; ia < g; ++ia)
185 at(ia) = at(2 * g - 1 - ia); // mirror about g-1/2
186 else
187 for (int ia = na - g; ia < na; ++ia)
188 at(ia) = at(2 * (na - g) - 1 - ia); // about na-g-1/2
189 });
190}
191
192// Collocated (cell-centered) velocity Dirichlet / no-slip ghost on one domain face. The wall sits
193// at the boundary FACE (between the last inner cell and the first ghost), so EVERY component is
194// reflected about it
195// -- ghost = 2*wc - mirror(interior) makes the face-interpolated value equal `wc`. No
196// normal/tangential split and no implicit fold: explicit reflection, re-imposed each smoother sweep
197// (converges to no-slip). `wc` is the scalar `wall`, or a per-position value from `prof` (the
198// resampled inlet profile, indexed (p0*prof_nc+p1)*3+comp over the face's perpendicular plane) when
199// one is supplied (e.g. the BFS step inlet).
200inline void bcVelocityColocated(BField f, B3 ext, int g, int a, int s, double wall, int comp = 0,
201 BField prof = BField(), int prof_nc = 0) {
202 BExec space;
203 int dims[3];
204 long strides[3];
206 const int b = (a + 1) % 3, c = (a + 2) % 3;
207 const long sa = strides[a], sb = strides[b], sc = strides[c];
208 const int na = dims[a];
209 const bool hasProf = prof.extent(0) > 0;
210 using MD = MDRange2<BExec>;
211 Kokkos::parallel_for(
212 "peclet::flow::bc_vel_coloc", MD(space, {0, 0}, {dims[b], dims[c]}),
213 KOKKOS_LAMBDA(int p0, int p1) {
214 const long base = static_cast<long>(p0) * sb + static_cast<long>(p1) * sc;
215 const double wc = hasProf ? prof((static_cast<long>(p0) * prof_nc + p1) * 3 + comp) : wall;
216 auto at = [&](int ia) -> double& { return f(base + static_cast<long>(ia) * sa); };
217 if (s == 0)
218 for (int ia = 0; ia < g; ++ia)
219 at(ia) = 2.0 * wc - at(2 * g - 1 - ia); // mirror about g-1/2
220 else
221 for (int ia = na - g; ia < na; ++ia)
222 at(ia) = 2.0 * wc - at(2 * (na - g) - 1 - ia); // about na-g-1/2
223 });
224}
225
226// A0 cell bodies (doc/vof_step_performance_design.md §5.2) of the two pressure ghost policies
227// below: one transverse position `base` of the face, its ghost layers [lo, hi] along the stride sa.
228template <class FV>
229KOKKOS_INLINE_FUNCTION void bcNeumannGhostCell(const FV& f, long base, long sa, int bic, int lo,
230 int hi) {
231 const double pin = f(base + static_cast<long>(bic) * sa);
232 for (int ia = lo; ia <= hi; ++ia)
233 f(base + static_cast<long>(ia) * sa) = pin;
234}
235template <class FV>
236KOKKOS_INLINE_FUNCTION void bcZeroPressureGhostCell(const FV& phi, long base, long sa, int lo,
237 int hi) {
238 for (int ia = lo; ia <= hi; ++ia)
239 phi(base + (long)ia * sa) = 0.0;
240}
241
242// Zero-gradient (Neumann) ghost on one domain face: every ghost layer = the boundary-adjacent inner
243// cell (cell-centered). Used for the collocated pressure increment phi at walls so the
244// cell-centered correction carries no spurious normal acceleration (the same role pressureBcGhost
245// plays for P in the predictor).
246inline void bcNeumannGhost(BField f, B3 ext, int g, int a, int s) {
247 BExec space;
248 int dims[3];
249 long strides[3];
251 const int b = (a + 1) % 3, c = (a + 2) % 3;
252 const long sa = strides[a], sb = strides[b], sc = strides[c];
253 const int na = dims[a];
254 const int bic = (s == 0) ? g : (na - g - 1);
255 const int lo = (s == 0) ? 0 : (na - g), hi = (s == 0) ? (g - 1) : (na - 1);
256 using MD = MDRange2<BExec>;
257 Kokkos::parallel_for(
258 "peclet::flow::bc_neumann_ghost", MD(space, {0, 0}, {dims[b], dims[c]}),
259 KOKKOS_LAMBDA(int p0, int p1) {
260 bcNeumannGhostCell(f, static_cast<long>(p0) * sb + static_cast<long>(p1) * sc, sa, bic, lo,
261 hi);
262 });
263}
264
265// Zero-gradient (Neumann) outflow velocity ghost for component comp on one face.
266inline void bcOutflowComp(BField f, B3 ext, int g, int a, int s, int comp, int fold) {
267 BExec space;
268 int dims[3];
269 long strides[3];
271 const int b = (a + 1) % 3, c = (a + 2) % 3;
272 const long sa = strides[a], sb = strides[b], sc = strides[c];
273 const int na = dims[a];
274 using MD = MDRange2<BExec>;
275 Kokkos::parallel_for(
276 "peclet::flow::bc_outflow", MD(space, {0, 0}, {dims[b], dims[c]}),
277 KOKKOS_LAMBDA(int p0, int p1) {
278 const long base = static_cast<long>(p0) * sb + static_cast<long>(p1) * sc;
279 auto at = [&](int ia) -> double& { return f(base + static_cast<long>(ia) * sa); };
280 if (s == 0) {
281 const int src = (comp == a) ? g + 1 : g;
282 const int last = (comp == a) ? g : g - 1;
283 const double v = fold ? 0.0 : at(src);
284 for (int ia = 0; ia <= last; ++ia)
285 at(ia) = v;
286 } else {
287 const int src = na - g - 1;
288 const double v = fold ? 0.0 : at(src);
289 for (int ia = na - g; ia < na; ++ia)
290 at(ia) = v;
291 }
292 });
293}
294
295// Implicit-diffusion face-fold accumulation at the boundary-adjacent inner cell.
296inline void bcDiffusionFold(BField dcorr, BField brhs, B3 ext, int g, int a, int s, double dval,
297 double bval) {
298 BExec space;
299 int dims[3];
300 long strides[3];
302 const int b = (a + 1) % 3, c = (a + 2) % 3;
303 const long sa = strides[a], sb = strides[b], sc = strides[c];
304 const int bic = (s == 0) ? g : (dims[a] - g - 1);
305 using MD = MDRange2<BExec>;
306 Kokkos::parallel_for(
307 "peclet::flow::bc_fold", MD(space, {0, 0}, {dims[b], dims[c]}),
308 KOKKOS_LAMBDA(int p0, int p1) {
309 const long i =
310 static_cast<long>(p0) * sb + static_cast<long>(p1) * sc + static_cast<long>(bic) * sa;
311 dcorr(i) += dval;
312 brhs(i) += bval;
313 });
314}
315
316// Hold the pressure ghost at 0 on an outflow face (Dirichlet p=0; the open face couples to it).
317inline void bcZeroPressureGhost(BField phi, B3 ext, int g, int a, int s) {
318 BExec space;
319 int dims[3];
320 long strides[3];
322 const int b = (a + 1) % 3, c = (a + 2) % 3;
323 const long sa = strides[a], sb = strides[b], sc = strides[c];
324 const int na = dims[a];
325 const int lo = (s == 0) ? 0 : (na - g), hi = (s == 0) ? (g - 1) : (na - 1);
326 using MD = MDRange2<BExec>;
327 Kokkos::parallel_for(
328 "peclet::flow::bc_zero_p_ghost", MD(space, {0, 0}, {dims[b], dims[c]}),
329 KOKKOS_LAMBDA(int p0, int p1) {
330 bcZeroPressureGhostCell(phi, (long)p0 * sb + (long)p1 * sc, sa, lo, hi);
331 });
332}
333
334// Projection correction of the high-side outflow normal face (index na-g) that correct_k misses:
335// f -= phi[bf] - phi[bf-sa] (with the Dirichlet ghost phi[bf]=0 -> += phi_inner).
336// (correct_outflow_k.)
337//
338// PHASE 2 (doc/anisotropic_metric.md §3): `wa` is the per-axis pressure weight w_a = 1/h_a'^2 of
339// the face's own axis, applied OUTSIDE the existing expression exactly as in the interior
340// kernels (projectCorrect and friends) this face continues. 1.0 on the isotropic path (exact).
341inline void bcCorrectOutflow(BField f, BField phi, B3 ext, int g, int a, double wa = 1.0) {
342 BExec space;
343 int dims[3];
344 long strides[3];
346 const int b = (a + 1) % 3, c = (a + 2) % 3;
347 const long sa = strides[a], sb = strides[b], sc = strides[c];
348 using MD = MDRange2<BExec>;
349 Kokkos::parallel_for(
350 "peclet::flow::bc_correct_outflow", MD(space, {0, 0}, {dims[b], dims[c]}),
351 KOKKOS_LAMBDA(int p0, int p1) {
352 const long bf = (long)p0 * sb + (long)p1 * sc + (long)(dims[a] - g) * sa;
353 f(bf) -= wa * (phi(bf) - phi(bf - sa));
354 });
355}
356
357// VARIABLE-DENSITY sibling of bcCorrectOutflow (WO-R item 4; the gap
358// doc/variable_density_projection.md section 4 listed as "revisit with a two-phase outflow case").
359//
360// Every other face of the staggered correction carries the mobility factor rho0/rho_f
361// (projectCorrectVar); the outflow face did not, so at a density ratio r the outflow face was
362// corrected by a factor r too much or too little relative to its neighbours. Constant density
363// hides it exactly (rho_f == rho0 makes the factor 1), which is why the channel/BFS validations
364// never saw it.
365//
366// rho_f is the SAME arithmetic face mean the operator coefficient and every other corrected face
367// use (buildRhoCoeff / projectCorrectVar). At the outflow face the outer cell is a ghost whose rho
368// the Neumann property policy (fillPropGhosts) set to the inner cell's rho, so this evaluates to
369// the inner cell's rho — the statement WO-R makes — while remaining literally the same expression
370// as the interior kernel, which is what keeps the two consistent if the ghost policy ever changes.
371inline void bcCorrectOutflowVar(BField f, BField phi, BField rho, double rho0, B3 ext, int g, int a,
372 bool harmonic, double wa = 1.0) {
373 BExec space;
374 int dims[3];
375 long strides[3];
377 const int b = (a + 1) % 3, c = (a + 2) % 3;
378 const long sa = strides[a], sb = strides[b], sc = strides[c];
379 using MD = MDRange2<BExec>;
380 Kokkos::parallel_for(
381 "peclet::flow::bc_correct_outflow_var", MD(space, {0, 0}, {dims[b], dims[c]}),
382 KOKKOS_LAMBDA(int p0, int p1) {
383 const long bf = (long)p0 * sb + (long)p1 * sc + (long)(dims[a] - g) * sa;
384 const double ra = rho(bf), rb = rho(bf - sa);
385 // matched to projectCorrectVar / projectCorrectVarHarm (the harmonic knob is a measured
386 // ablation, set_rho_face_harmonic; it must switch BOTH or the outflow face disagrees with
387 // the interior it is continuing)
388 const double rf = harmonic ? (2.0 * ra * rb / (ra + rb)) : (0.5 * (ra + rb));
389 f(bf) -= wa * (rho0 / rf * (phi(bf) - phi(bf - sa)));
390 });
391}
392
393// Save / restore the HIGH-side domain-face plane of a field over the block's INNER transverse
394// range. SCALING_ISSUES #3/#8: that face is the first GHOST index along axis `a`, and the
395// distributed halo wraps periodically on every axis, so after an exchange it carries the OPPOSITE
396// boundary's value -- which destroys the mass-conserving outflow correction the projection wrote
397// there and that `fillVelGhostsTo(..., doOutflow = false)` exists to preserve.
398//
399// INNER transverse range ONLY, and that is the point: the plane's transverse ghost rows are
400// legitimately the NEIGHBOUR's inner values, which the exchange has just delivered correctly.
401// Putting stale local values back over them would trade one wrong plane for another.
402inline void bcSaveHighFacePlaneInner(BField dst, BField src, B3 ext, int g, int a) {
403 BExec space;
404 int dims[3];
405 long strides[3];
407 const int b = (a + 1) % 3, c = (a + 2) % 3;
408 const long sa = strides[a], sb = strides[b], sc = strides[c];
409 const int bf = dims[a] - g, nb = dims[b] - 2 * g, nc = dims[c] - 2 * g;
410 using MD = MDRange2<BExec>;
411 Kokkos::parallel_for(
412 "peclet::flow::bc_save_high_face", MD(space, {0, 0}, {nb, nc}),
413 KOKKOS_LAMBDA(int p0, int p1) {
414 dst((long)p0 + (long)p1 * nb) =
415 src((long)(p0 + g) * sb + (long)(p1 + g) * sc + (long)bf * sa);
416 });
417}
418inline void bcRestoreHighFacePlaneInner(BField dst, BField src, B3 ext, int g, int a) {
419 BExec space;
420 int dims[3];
421 long strides[3];
423 const int b = (a + 1) % 3, c = (a + 2) % 3;
424 const long sa = strides[a], sb = strides[b], sc = strides[c];
425 const int bf = dims[a] - g, nb = dims[b] - 2 * g, nc = dims[c] - 2 * g;
426 using MD = MDRange2<BExec>;
427 Kokkos::parallel_for(
428 "peclet::flow::bc_restore_high_face", MD(space, {0, 0}, {nb, nc}),
429 KOKKOS_LAMBDA(int p0, int p1) {
430 dst((long)(p0 + g) * sb + (long)(p1 + g) * sc + (long)bf * sa) =
431 src((long)p0 + (long)p1 * nb);
432 });
433}
434
435// Set the a-component face openness on a domain face to `val` (Neumann wall/inflow -> 0; the
436// periodic fill would otherwise wrap the wrong value into an outflow face from the opposite
437// boundary -> set it open = 1).
438inline void bcSetOpenness(BField oa, B3 ext, int g, int a, int s, double val) {
439 BExec space;
440 int dims[3];
441 long strides[3];
443 const int b = (a + 1) % 3, c = (a + 2) % 3;
444 const long sa = strides[a], sb = strides[b], sc = strides[c];
445 const int bf = (s == 0) ? g : (dims[a] - g);
446 using MD = MDRange2<BExec>;
447 Kokkos::parallel_for(
448 "peclet::flow::bc_setopen", MD(space, {0, 0}, {dims[b], dims[c]}),
449 KOKKOS_LAMBDA(int p0, int p1) {
450 oa(static_cast<long>(p0) * sb + static_cast<long>(p1) * sc + static_cast<long>(bf) * sa) =
451 val;
452 });
453}
454inline void bcZeroOpenness(BField oa, B3 ext, int g, int a, int s) {
455 bcSetOpenness(oa, ext, g, a, s, 0.0);
456}
457
458} // namespace peclet::flow
459
460#endif // PECLET_FLOW_MAC_BC_HPP
void axisDims(B3 ext, int(&dims)[3], long(&strides)[3])
Definition mac_bc.hpp:28
void velFaceColumn(const At &at, int na, int g, int a, int s, int comp, double wc, int fold)
Definition mac_bc.hpp:39
void bcNeumannGhostCell(const FV &f, long base, long sa, int bic, int lo, int hi)
Definition mac_bc.hpp:229
void bcCorrectOutflow(BField f, BField phi, B3 ext, int g, int a, double wa=1.0)
Definition mac_bc.hpp:341
void bcRestoreHighFacePlaneInner(BField dst, BField src, B3 ext, int g, int a)
Definition mac_bc.hpp:418
void bcSetOpenness(BField oa, B3 ext, int g, int a, int s, double val)
Definition mac_bc.hpp:438
void bcZeroPressureGhost(BField phi, B3 ext, int g, int a, int s)
Definition mac_bc.hpp:317
void bcZeroOpenness(BField oa, B3 ext, int g, int a, int s)
Definition mac_bc.hpp:454
void bcDiffusionFold(BField dcorr, BField brhs, B3 ext, int g, int a, int s, double dval, double bval)
Definition mac_bc.hpp:296
void bcVelocityColocated(BField f, B3 ext, int g, int a, int s, double wall, int comp=0, BField prof=BField(), int prof_nc=0)
Definition mac_bc.hpp:200
void bcSaveHighFacePlaneInner(BField dst, BField src, B3 ext, int g, int a)
Definition mac_bc.hpp:402
void bcZeroPressureGhostCell(const FV &phi, long base, long sa, int lo, int hi)
Definition mac_bc.hpp:236
void bcVelocityComp(BField f, B3 ext, int g, int a, int s, int comp, double wall, int fold, BField prof=BField(), int prof_nc=0)
Definition mac_bc.hpp:70
BExec::memory_space BMem
Definition mac_bc.hpp:20
void bcMirrorGhost(BField f, B3 ext, int g, int a, int s)
Definition mac_bc.hpp:169
Kokkos::View< double *, BMem > BField
Definition mac_bc.hpp:21
void bcVelocityFaces(const BcVelFaces &J, B3 ext, int g, int a, int fold)
Definition mac_bc.hpp:106
void bcCorrectOutflowVar(BField f, BField phi, BField rho, double rho0, B3 ext, int g, int a, bool harmonic, double wa=1.0)
Definition mac_bc.hpp:371
void bcOutflowComp(BField f, B3 ext, int g, int a, int s, int comp, int fold)
Definition mac_bc.hpp:266
Kokkos::DefaultExecutionSpace BExec
Definition mac_bc.hpp:19
void bcNeumannGhost(BField f, B3 ext, int g, int a, int s)
Definition mac_bc.hpp:246
void bcSlipComp(BField f, B3 ext, int g, int a, int s, int comp, int fold)
Definition mac_bc.hpp:138
Definition prof.py:1
flow — the multidimensional iteration policies: iteration order follows storage.
BcVelFace j[kMax]
Definition mac_bc.hpp:103
static constexpr int kMax
Definition mac_bc.hpp:102
Kokkos::View< float *, IMem > FV