9#ifndef PECLET_FLOW_GAUGE_EXACT_GRADIENT_HPP
10#define PECLET_FLOW_GAUGE_EXACT_GRADIENT_HPP
12#include <Kokkos_Core.hpp>
40 "peclet::flow::gp_center_grad",
MD(
space, {g, g, g}, {e.x - g, e.y - g, e.z - g}),
42 const long sy = e.x, sz = (
long)e.x * e.y;
43 const long i = (
long)x + (
long)y * sy + (
long)z * sz;
44 const long sa = (axis == 0) ? 1 : (axis == 1) ? sy : sz;
49 const bool am = sdf(i -
sa) >= 0.0, ap = sdf(i +
sa) >= 0.0;
52 gr = 0.5 * (p(i +
sa) - p(i -
sa));
54 gr = (sdf(i + 2 *
sa) >= 0.0) ? 0.5 * (-3.0 * p(i) + 4.0 * p(i +
sa) - p(i + 2 *
sa))
57 gr = (sdf(i - 2 *
sa) >= 0.0) ? 0.5 * (3.0 * p(i) - 4.0 * p(i -
sa) + p(i - 2 *
sa))
flow — portable (Kokkos) cut-cell pressure-operator face openness from an SDF.
Kokkos::View< double *, CCMem > CCField
Kokkos::DefaultExecutionSpace CCExec
void gpCenterGrad(CCField out, CCConst p, CCConst sdf, int axis, C3 e, int g, double wa=1.0)
Directional cell-center gradient (collocated ghost path) of a cell field p whose solid-centered rows ...
Kokkos::View< const double *, CCMem > CCConst
flow — the multidimensional iteration policies: iteration order follows storage.