20#ifndef PECLET_FLOW_SCALAR_TRANSPORT_HPP
21#define PECLET_FLOW_SCALAR_TRANSPORT_HPP
23#include <Kokkos_Core.hpp>
45 int bc[6] = {0, 0, 0, 0, 0, 0};
46 double bcVal[6] = {0, 0, 0, 0, 0, 0};
56 double D,
double idt,
C3 e,
int g) {
58 using MD = Kokkos::MDRangePolicy<CCExec, Kokkos::Rank<3>>;
60 "peclet::flow::scalar_build_diff",
MD(
space, {g, g, g}, {e.x - g, e.y - g, e.z - g}),
62 const long sx = 1,
sy = e.x,
sz = (
long)e.x * e.y;
64 const double tw = D * ox(
i),
te = D * ox(
i +
sx);
65 const double ts = D * oy(
i),
tn = D * oy(
i +
sy);
66 const double tb = D * oz(
i),
tt = D * oz(
i +
sz);
83 using MD = Kokkos::MDRangePolicy<CCExec, Kokkos::Rank<3>>;
85 "peclet::flow::scalar_build_rhs",
MD(
space, {g, g, g}, {e.x - g, e.y - g, e.z - g}),
87 const long sx = 1,
sy = e.x,
sz = (
long)e.x * e.y;
92 for (
int fd = 0;
fd < 3; ++
fd) {
93 const long s = (
fd == 0) ?
sx : (
fd == 1) ?
sy :
sz;
97 const double om =
Of(
i), op =
Of(
i + s);
98 const double cLL = cOld(
i - 2 * s),
cL = cOld(
i - s),
cR = cOld(
i),
cRR = cOld(
i + s),
99 cRRR = cOld(
i + 2 * s);
104 }
else if (scheme == 2) {
113 b(
i) = idt * cOld(
i) -
adv;
flow — portable (Kokkos) cut-cell pressure-operator face openness from an SDF.
void ibmFillEntry(const OV &o, int list_idx, int c_idx, float sdf_c, const float sdf_n[6], int bc_type, const float *thEx)
Kokkos::View< double *, CCMem > CCField
void scalarBuildDiffusionOpen(CCField AC, CCField AW, CCField AE, CCField AS, CCField AN, CCField AB, CCField AT, CCConst ox, CCConst oy, CCConst oz, double D, double idt, C3 e, int g)
Kokkos::DefaultExecutionSpace CCExec
Kokkos::View< const double *, CCMem > CCConst
void scalarBuildRhs(CCField b, CCConst cOld, CCConst U, CCConst V, CCConst W, CCConst ox, CCConst oy, CCConst oz, double idt, int scheme, C3 e, int g)
double fou_flux(double L, double R, double vel)
double tvd(double LL, double L, double R, double RR, double vel)
double sou(double LL, double L, double R, double RR, double vel)
flow — portable (Kokkos) staggered MAC momentum advection (Koren TVD + FOU).
static constexpr double AC