56#ifndef PECLET_FLOW_VOF_COLOUR_BC_HPP
57#define PECLET_FLOW_VOF_COLOUR_BC_HPP
59#include <Kokkos_Core.hpp>
74 strides[2] =
static_cast<long>(e.x) * e.y;
85 const bool p0 = px,
p1 = py,
p2 = pz;
86 const int q0 = gs.x,
q1 = gs.y,
q2 = gs.z;
90 const int gx = x - g + o.x,
gy = y - g + o.y,
gz = z - g + o.z;
93 m(
L3(x, y, z, e)) = out ? 1u : 0u;
105 const int b = (a + 1) % 3, c = (a + 2) % 3;
107 const int na =
dims[a];
108 const int lo = (s == 0) ? 0 : (na - g);
109 Kokkos::parallel_for(
112 const long base =
static_cast<long>(p0) *
sb +
static_cast<long>(
p1) * sc;
113 for (
int k = 0; k < g; ++k)
114 f(base +
static_cast<long>(lo + k) *
sa) = value;
127 const int b = (a + 1) % 3, c = (a + 2) % 3;
129 const int na =
dims[a];
130 const int lo = (s == 0) ? 0 : (na - g);
131 Kokkos::parallel_for(
134 const long base =
static_cast<long>(p0) *
sb +
static_cast<long>(
p1) * sc;
135 const double v =
prof(
static_cast<long>(p0) * nc +
p1);
136 for (
int k = 0; k < g; ++k)
137 f(base +
static_cast<long>(lo + k) *
sa) = v;
156 const int b = (a + 1) % 3, c = (a + 2) % 3;
158 const int na =
dims[a];
159 const int lo = (s == 0) ? 0 : (na - g);
160 const int fa = (s == 0) ? (g - 1) : (na - g - 1);
161 const double sgn = (s == 0) ? 1.0 : -1.0;
162 Kokkos::parallel_for(
165 const long base =
static_cast<long>(p0) *
sb +
static_cast<long>(
p1) * sc;
166 if (sgn *
un(base +
static_cast<long>(
fa) *
sa) <= 0.0)
168 for (
int k = 0; k < g; ++k)
169 f(base +
static_cast<long>(lo + k) *
sa) =
backflow;
flow — VoF rung V1: Weymouth & Yue (2010) directionally-split, exactly volume-conserving geometric ad...
flow — portable (Kokkos) MAC stencil operators: Red-Black Gauss-Seidel smoothers + divergence.
void axisDims(I3 e, int(&dims)[3], long(&strides)[3])
void bcColourBackflow(SField f, I3 e, int g, int a, int s, SField un, double backflow)
inletOutlet on an outflow face: where the boundary face velocity points INTO the domain,...
void bcColourConst(SField f, I3 e, int g, int a, int s, double value)
Overwrite ALL g ghost layers of domain face (axis a, side s) with a constant colour.
void bcColourProfile(SField f, I3 e, int g, int a, int s, SField prof, int nc)
Same, with a per-position colour on the face's (b, c) plane.
void buildOutsideMask(UCField m, I3 e, int g, I3 o, I3 gs, bool px, bool py, bool pz)
1 for every ghost cell of the block that lies OUTSIDE the global domain on a non-periodic axis,...
Kokkos::View< unsigned char *, SMem > UCField
long L3(int x, int y, int z, I3 e)
Kokkos::DefaultExecutionSpace SExec
Kokkos::View< double *, SMem > SField
flow — the multidimensional iteration policies: iteration order follows storage.