core 1.8.1
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
cut_cell_closure.hpp File Reference

core — the shared cut-cell IBM boundary-distance closure polynomials (flow <-> amr). More...

Go to the source code of this file.

Namespaces

namespace  peclet
namespace  peclet::core
namespace  peclet::core::scheme

Macros

#define PECLET_CORE_CC_HD   KOKKOS_INLINE_FUNCTION

Functions

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_nb (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nc (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc (Real)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_avg (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nnb_avg (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nc_avg (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_avg (Real)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_slip (Real xi, Real lam)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_nb_slip (Real xi, Real lam)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nc_slip (Real xi, Real lam)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_sandwich (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_c_sandwich (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_pp_sw (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_mp_sw (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_sandwich_avg (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_c_sandwich_avg (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_pp_sw_avg (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_mp_sw_avg (Real xi_m, Real xi_p)

Detailed Description

core — the shared cut-cell IBM boundary-distance closure polynomials (flow <-> amr).

QUALITY_PLAN §3.G.2 ("What IS shared"): the one-sided Dirichlet closure that a cut cell's Shortley-Weller ghost value satisfies,

poly_D(th) * u_ghost = 2*u_bc + poly_Nc(th)*u_near + poly_N_nb(th)*u_far
th = sdf_near / (sdf_near - sdf_ghost), clamped to (0, 1]

(plus its sandwiched-axis and cell-average siblings) was written independently twice: in flow/src/cut_cell_ibm.hpp (float, KOKKOS_INLINE_FUNCTION, the momentum IBM's Robust-Scaled overlay) and in amr/include/peclet/amr/cut_cell.hpp's cc:: namespace (double, MORTON_HD, the octree's Dirichlet operator). Both are pure functions of local crossing fractions with no data layout in them, so this ONE templated copy replaces both: flow instantiates it at Real = float (or double under -DPECLET_FLOW_OPERATOR_DOUBLE, G.6), amr at Real = double. Verified identical between the two pre-lift copies (same formulas, same literal constants, same operation order) before this header existed; a unit test (tests/test_cut_cell_closure.cpp) pins every polynomial against the literal expressions at a few theta values.

amr's cc:: namespace used only the point-value (SCHEME 0) subset — poly_D, poly_N_nb, poly_Nc, poly_Nbc, poly_D_sandwich, poly_N_c_sandwich, poly_Nbc_pp_sw, poly_Nbc_mp_sw — plus its own poly_abs (a host/device std::fabs substitute, not part of the closure family, so it is NOT lifted here; amr keeps it local). This header also carries flow's cell-average (SCHEME 1) siblings (poly_D_avg, poly_Nnb_avg, poly_Nc_avg, poly_Nbc_avg, poly_D_sandwich_avg, poly_N_c_sandwich_avg, poly_Nbc_pp_sw_avg, poly_Nbc_mp_sw_avg) and the Navier-slip generalization (poly_D_slip, poly_N_nb_slip, poly_Nc_slip, WO-V6b) that amr does not use but flow does – one file, every scheme.

Host/device: PECLET_CORE_CC_HD is KOKKOS_INLINE_FUNCTION when Kokkos_Core.hpp has been included BEFORE this header, plain inline otherwise (host-only oracle builds) – the same convention scheme/ghost_closure.hpp uses.

Definition in file cut_cell_closure.hpp.

Macro Definition Documentation

◆ PECLET_CORE_CC_HD

#define PECLET_CORE_CC_HD   KOKKOS_INLINE_FUNCTION

Definition at line 37 of file cut_cell_closure.hpp.

Referenced by peclet::core::scheme::buildProbe(), peclet::core::scheme::detail::ccgAbs(), peclet::core::scheme::detail::ccgCornerPos(), peclet::core::scheme::detail::ccgCross(), peclet::core::scheme::detail::ccgCrossProd(), peclet::core::scheme::detail::ccgFanCorner(), peclet::core::scheme::detail::ccgFanTet(), peclet::core::scheme::detail::ccgMaxAbs3(), peclet::core::scheme::detail::ccgMaxAbs4(), peclet::core::scheme::detail::ccgNorm(), peclet::core::scheme::detail::ccgSqrt(), peclet::core::scheme::detail::ccgTangents(), peclet::core::scheme::detail::ccgTetPiece(), peclet::core::scheme::cutCellFaceArea(), peclet::core::scheme::cutCellGeometryFanTet(), peclet::core::scheme::facetAreaVector(), peclet::core::scheme::fanFaceAperture(), peclet::core::scheme::interfaceConductance(), peclet::core::scheme::poly_D(), peclet::core::scheme::poly_D_avg(), peclet::core::scheme::poly_D_sandwich(), peclet::core::scheme::poly_D_sandwich_avg(), peclet::core::scheme::poly_D_slip(), peclet::core::scheme::poly_N_c_sandwich(), peclet::core::scheme::poly_N_c_sandwich_avg(), peclet::core::scheme::poly_N_nb(), peclet::core::scheme::poly_N_nb_slip(), peclet::core::scheme::poly_Nbc(), peclet::core::scheme::poly_Nbc_avg(), peclet::core::scheme::poly_Nbc_mp_sw(), peclet::core::scheme::poly_Nbc_mp_sw_avg(), peclet::core::scheme::poly_Nbc_pp_sw(), peclet::core::scheme::poly_Nbc_pp_sw_avg(), peclet::core::scheme::poly_Nc(), peclet::core::scheme::poly_Nc_avg(), peclet::core::scheme::poly_Nc_slip(), peclet::core::scheme::poly_Nnb_avg(), peclet::core::scheme::detail::probeAllUnknown(), peclet::core::scheme::detail::probeCandidate(), peclet::core::scheme::detail::probeFillAll(), peclet::core::scheme::detail::probeFloor(), peclet::core::scheme::probeSupport(), peclet::core::scheme::snapAperture(), peclet::core::scheme::detail::tetOnePositive(), peclet::core::scheme::tetPositiveFraction(), peclet::core::scheme::detail::tetTwoPositive(), peclet::core::scheme::trilinearStencil(), peclet::core::scheme::detail::triOnePositive(), peclet::core::scheme::triPositiveFraction(), and peclet::core::scheme::wallConductance().