12#ifndef PECLET_FLOW_GRID_LAYOUT_HPP
13#define PECLET_FLOW_GRID_LAYOUT_HPP
36 static constexpr const char*
name =
"staggered";
39 return c == 0 ?
Off3{-0.5f, 0.0f, 0.0f}
40 : c == 1 ?
Off3{0.0f, -0.5f, 0.0f}
41 :
Off3{0.0f, 0.0f, -0.5f};
49 KOKKOS_INLINE_FUNCTION
static double atVelocity(
const A& f,
long i,
long s) {
50 return 0.5 * ((double)f(i) + (double)f(i - s));
56 KOKKOS_INLINE_FUNCTION
static double advect(
int c,
int x,
int y,
int z, A
U, A V, A W, A
F,
61 KOKKOS_INLINE_FUNCTION
static double advect_sou(
int c,
int x,
int y,
int z, A
U, A V, A W, A
F,
66 KOKKOS_INLINE_FUNCTION
static double advect_fou(
int c,
int x,
int y,
int z, A
U, A V, A W, A
F,
71 KOKKOS_INLINE_FUNCTION
static void fou_operator(
int c,
int x,
int y,
int z, A
U, A V, A W,
72 double dt,
double& cC,
double& cxm,
double& cxp,
73 double& cym,
double& cyp,
double& czm,
75 sadv::fou_operator(c, x, y, z,
U, V, W, dt, cC, cxm, cxp, cym, cyp, czm, czp);
84 static constexpr const char*
name =
"colocated";
89 KOKKOS_INLINE_FUNCTION
static double atVelocity(
const A& f,
long i,
long ) {
96 KOKKOS_INLINE_FUNCTION
static double advect(
int c,
int x,
int y,
int z, A
U, A V, A W, A
F,
101 KOKKOS_INLINE_FUNCTION
static double advect_sou(
int c,
int x,
int y,
int z, A
U, A V, A W, A
F,
106 KOKKOS_INLINE_FUNCTION
static double advect_fou(
int c,
int x,
int y,
int z, A
U, A V, A W, A
F,
111 KOKKOS_INLINE_FUNCTION
static void fou_operator(
int c,
int x,
int y,
int z, A
U, A V, A W,
112 double dt,
double& cC,
double& cxm,
double& cxp,
113 double& cym,
double& cyp,
double& czm,
114 double& czp,
bool uf) {
115 cadv::fou_operator(c, x, y, z,
U, V, W, dt, cC, cxm, cxp, cym, cyp, czm, czp, uf);
flow — collocated (cell-centered) momentum advection (Koren TVD + FOU).
flow — portable (Kokkos) IBM geometric fields + variable-coefficient RB-GS smoother.
void fou_operator(int comp, int x, int y, int z, A U, A V, A W, double dt, double &cC, double &cxm, double &cxp, double &cym, double &cyp, double &czm, double &czp, bool uf)
double advect(int comp, int x, int y, int z, A U, A V, A W, A PHI, bool uf)
double advect_sou(int comp, int x, int y, int z, A U, A V, A W, A PHI, bool uf)
double advect_fou(int comp, int x, int y, int z, A U, A V, A W, A PHI, bool uf)
double advect(int comp, int x, int y, int z, A U, A V, A W, A PHI)
double advect_sou(int comp, int x, int y, int z, A U, A V, A W, A PHI)
void fou_operator(int comp, int x, int y, int z, A U, A V, A W, double dt, double &cC, double &cxm, double &cxp, double &cym, double &cyp, double &czm, double &czp)
double advect_fou(int comp, int x, int y, int z, A U, A V, A W, A PHI)
flow — portable (Kokkos) staggered MAC momentum advection (Koren TVD + FOU).
static double atVelocity(const A &f, long i, long)
static double advect_fou(int c, int x, int y, int z, A U, A V, A W, A F, bool uf)
static constexpr const char * name
static constexpr Off3 offset(int)
static void fou_operator(int c, int x, int y, int z, A U, A V, A W, double dt, double &cC, double &cxm, double &cxp, double &cym, double &cyp, double &czm, double &czp, bool uf)
static double advect_sou(int c, int x, int y, int z, A U, A V, A W, A F, bool uf)
static constexpr bool collocated
static double advect(int c, int x, int y, int z, A U, A V, A W, A F, bool uf)
static constexpr const char * name
static double advect(int c, int x, int y, int z, A U, A V, A W, A F, bool)
static void fou_operator(int c, int x, int y, int z, A U, A V, A W, double dt, double &cC, double &cxm, double &cxp, double &cym, double &cyp, double &czm, double &czp, bool)
static double advect_sou(int c, int x, int y, int z, A U, A V, A W, A F, bool)
static constexpr bool collocated
static constexpr Off3 offset(int c)
static double atVelocity(const A &f, long i, long s)
static double advect_fou(int c, int x, int y, int z, A U, A V, A W, A F, bool)
static constexpr double F
static constexpr double U