29#ifndef PECLET_CORE_SCHEME_GHOST_CLOSURE_HPP
30#define PECLET_CORE_SCHEME_GHOST_CLOSURE_HPP
36#ifdef KOKKOS_INLINE_FUNCTION
37#define PECLET_CORE_GP_HD KOKKOS_INLINE_FUNCTION
39#define PECLET_CORE_GP_HD inline
57 return xi * (1.0f +
xi);
60 return 2.0f * (
xi *
xi - 1.0f);
63 return xi * (1.0f -
xi);
70#ifdef KOKKOS_INLINE_FUNCTION
71 return Kokkos::nan(
"");
73 return std::numeric_limits<float>::quiet_NaN();
85 float& w2,
float& D) {
100 w1 = (th - 1.0f) / th;
122 if (
sg >= 0.0f &&
snb >= 0.0f)
140 th = th <
lo ?
lo : (th > 2.0f ? 2.0f : th);
143 const bool src1 = (
sn >= 0.0f) && (
sc1 >= 0.0f);
144 const bool src2 = (
sf >= 0.0f) && (
sc2 >= 0.0f);
160 f.w1 = (th - 1.0f) / th;
174template <
class OV,
class CellId>
177 const float*
exStd =
nullptr,
const float*
exSliver =
nullptr) {
183 for (
int a = 0; a < 3; ++a) {
184 const bool solidM =
F[a][1] < 0.0f;
185 const bool solidP =
F[a][2] < 0.0f;
198 for (
int k = 0;
k < 6; ++
k) {
217 for (
int k = 0;
k < 6; ++
k) {
219 float wbc, w1, w2, D;
222 wbc = w1 = w2 = 0.0f;
#define PECLET_CORE_GP_HD
PECLET_CORE_GP_HD bool gpFillRow(const OV &ov, int slot, CellId cellId, const float F[3][4], const float Cq[3][5], int matrixOrder, int rhsOrder, const float *exStd=nullptr, const float *exSliver=nullptr)
Fill one overlay row from the per-axis sample sets.
PECLET_CORE_GP_HD float gpNan()
PECLET_CORE_GP_HD float gpPolyNc(float xi)
PECLET_CORE_GP_HD GpFace gpClassifyFace(float sg, float sn, float sf, float sb, float snb, float sc1, float sc2, bool otherSolid, float exStd=gpNan(), float exSliver=gpNan())
Classify + fill ONE face from its 1-D sdf samples along the face's axis.
PECLET_CORE_GP_HD float gpPolyD(float xi)
constexpr float GP_THETA_MIN
PECLET_CORE_GP_HD bool gpFinite(float x)
PECLET_CORE_GP_HD void gpOrderWeights(int8_t st, float th, int order, float &wbc, float &w1, float &w2, float &D)
Closure weights for one ghost face at the requested extrapolation order.
PECLET_CORE_GP_HD float gpPolyNnb(float xi)
Kokkos::View< T *, MemSpace > View
1D device array.