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

Namespaces

namespace  detail

Classes

struct  CutCellGeometry
 The geometric record of one cell (§2.1). Double, cell-centred frame, internal lengths. More...
struct  GpFace
struct  ProbeResult
 One facet's probe: the rung, the probe distance s, and n stencil cells (lattice offsets relative to the facet's cell, weights summing to 1). More...

Enumerations

enum class  CutCellKind : int { none = 0 , single = 1 , gap = 2 , thinSolid = 3 }
 Facet classification of a cut cell (§2.2). More...
enum  GpState : int8_t {
  GP_COUPLED = 0 , GP_QUAD = 1 , GP_LIN = 2 , GP_BC_ONLY = 3 ,
  GP_EXPLICIT = 4
}

Functions

template<class Real>
PECLET_CORE_CC_HD Real poly_D (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real poly_N_nb (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nc (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nbc (Real)
template<class Real>
PECLET_CORE_CC_HD Real poly_D_avg (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nnb_avg (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nc_avg (Real xi)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nbc_avg (Real)
template<class Real>
PECLET_CORE_CC_HD Real poly_D_slip (Real xi, Real lam)
template<class Real>
PECLET_CORE_CC_HD Real poly_N_nb_slip (Real xi, Real lam)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nc_slip (Real xi, Real lam)
template<class Real>
PECLET_CORE_CC_HD Real poly_D_sandwich (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_N_c_sandwich (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nbc_pp_sw (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nbc_mp_sw (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_D_sandwich_avg (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_N_c_sandwich_avg (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nbc_pp_sw_avg (Real xi_m, Real xi_p)
template<class Real>
PECLET_CORE_CC_HD Real poly_Nbc_mp_sw_avg (Real xi_m, Real xi_p)
PECLET_CORE_CC_HD double triPositiveFraction (double a, double b, double c)
 Fraction of a triangle on which the linear interpolant of its vertex values (a, b, c) is strictly positive.
PECLET_CORE_CC_HD double tetPositiveFraction (double v0, double v1, double v2, double v3)
 Fraction of a tetrahedron on which the linear interpolant of its vertex values is strictly positive (§2.2).
PECLET_CORE_CC_HD double fanFaceAperture (double v00, double v10, double v11, double v01, double cc)
 PL aperture of one face from its fan (§2.2): the corner values in loop order c00, c10, c11, c01 over the face's tangent axes (t1 < t2) and the face-centre value cc, ¼ (F(c00,c10,cc) + F(c10,c11,cc) + F(c11,c01,cc) + F(c01,c00,cc)), summed in that order.
PECLET_CORE_CC_HD double snapAperture (double a)
 Snap a face aperture at both ends (§2.3): a < 1e-3 → 0, a > 1 − 1e-3 → 1, else a.
PECLET_CORE_CC_HD double cutCellFaceArea (int a, const double h[3])
 Face area of axis a for cell size h: the product of the two other spacings.
PECLET_CORE_CC_HD void facetAreaVector (const double ap[6], const double h[3], double out[3])
 The area vector the apertures imply through the divergence theorem (§2.3): out_a = A_a (ap[2a+1] − ap[2a]), A_a the a-face area.
PECLET_CORE_CC_HD CutCellGeometry cutCellGeometryFanTet (const double corner[8], const double face[6], double centre, const double h[3])
 The cut-cell record of one cell from its 15 PL samples (§2.2): corner[8] (index bx+2by+4bz), face[6] (−x,+x,−y,+y,−z,+z), the centre value, and the cell size h[3] (internal lengths).
PECLET_CORE_GP_HD float gpPolyD (float xi)
PECLET_CORE_GP_HD float gpPolyNc (float xi)
PECLET_CORE_GP_HD float gpPolyNnb (float xi)
PECLET_CORE_GP_HD float gpNan ()
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 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.
template<class OV, class CellId>
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_CC_HD double probeSupport (const double n[3], const double h[3])
 S(n) = ½ Σ_a |n_a| h_a: the support half-width of a cell of size h along the unit normal n (§3.1).
PECLET_CORE_CC_HD void trilinearStencil (const double xi[3], int base[3], double w[8])
 Trilinear stencil of the index-space point ξ (cell centres at integer ξ, relative to the facet's cell): base = floor(ξ), and w[k] for the cell base + (k & 1, (k >> 1) & 1, k >> 2), w[k] = Π_a (bit_a ?
template<class Lookup>
PECLET_CORE_CC_HD ProbeResult buildProbe (const double xw[3], const double n[3], const double h[3], const Lookup &L)
 Build the probe of one facet by the ladder of §3.3.
PECLET_CORE_CC_HD double wallConductance (double s, double L, double k)
 Wall conductance of a Robin facet (§1.4): G = 1 / (s/L + 1/k), the flux out of the fluid per area being G (u_p − g).
PECLET_CORE_CC_HD double interfaceConductance (double sf, double Lf, double Rc, double ss, double Ls)
 Conjugate interface conductance (§1.4): the series resistance of the fluid probe leg, the contact resistance and the solid probe leg, G_c = 1 / (s_f/Λ_f + R_c + s_s/Λ_s), so that the flux from solid to fluid is G_c (u_ps − u_pf) in the ψ form.

Variables

constexpr double kApertureSnap = 1e-3
 Aperture snap threshold at BOTH ends (§2.3): a < 1e-3 → 0, a > 1 − 1e-3 → 1.
constexpr double kPieceDropRel = 1e-14
 A facet piece with area < kPieceDropRel · min_a A_a is dropped (§2.2).
constexpr double kSingleFacetRho = 0.5
 ρ = |areaPL| / areaSum at or above which the cell carries ONE facet (§2.2).
constexpr float GP_THETA_MIN = 1e-4f
constexpr int kProbeR0 = 0
 Ladder rungs, in ProbeResult::rung (flow stores them as uint8).
constexpr int kProbeR1a = 1
constexpr int kProbeR1b = 2
constexpr int kProbeR2 = 3
constexpr double kProbeSigma = 1.1
 Probe distance factors on S(n) (§3.1, §3.3): R0 = 1.1, R1a = 1.5, R2 = 0.5.
constexpr double kProbeSigmaLong = 1.5
constexpr double kProbeSigmaLast = 0.5
constexpr double kProbeWeightEps = 1e-12
 V1 ignores stencil cells whose weight is at most this.
constexpr double kProbeClearance = 0.5
 V2: φ_phase(p) ≥ kProbeClearance · s.
constexpr int kProbeReach = 2
 V3: every stencil cell within ±kProbeReach cells on each axis (the G = 2 halo).
constexpr double kProbeGapMin = 0.2
 R1b is attempted only when the estimated gap w exceeds kProbeGapMin · S(n) ...
constexpr double kProbeMinKeptWeight = 0.5
 ... and accepted only when the kept weights sum to at least kProbeMinKeptWeight.

Enumeration Type Documentation

◆ CutCellKind

enum class peclet::core::scheme::CutCellKind : int
strong

Facet classification of a cut cell (§2.2).

Enumerator
none 

no facet (uncut, or every piece below the drop threshold)

single 

one facet (ρ ≥ 0.5, or the two-group split left a group empty)

gap 

two facets, fluid between two walls

thinSolid 

two facets, solid between two fluids (a counted resolution error)

Definition at line 53 of file cut_cell_geometry.hpp.

◆ GpState

Enumerator
GP_COUPLED 
GP_QUAD 
GP_LIN 
GP_BC_ONLY 
GP_EXPLICIT 

Definition at line 46 of file ghost_closure.hpp.

Function Documentation

◆ poly_D()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D ( Real xi)

Definition at line 46 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

Referenced by poly_D_slip().

◆ poly_N_nb()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_nb ( Real xi)

Definition at line 50 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

Referenced by poly_N_nb_slip().

◆ poly_Nc()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nc ( Real xi)

Definition at line 54 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

Referenced by poly_Nc_slip().

◆ poly_Nbc()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc ( Real )

Definition at line 58 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_D_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_avg ( Real xi)

Definition at line 64 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nnb_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nnb_avg ( Real xi)

Definition at line 68 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nc_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nc_avg ( Real xi)

Definition at line 72 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nbc_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_avg ( Real )

Definition at line 76 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_D_slip()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_slip ( Real xi,
Real lam )

Definition at line 85 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD, and poly_D().

◆ poly_N_nb_slip()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_nb_slip ( Real xi,
Real lam )

Definition at line 89 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD, and poly_N_nb().

◆ poly_Nc_slip()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nc_slip ( Real xi,
Real lam )

Definition at line 93 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD, and poly_Nc().

◆ poly_D_sandwich()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_sandwich ( Real xi_m,
Real xi_p )

Definition at line 99 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_N_c_sandwich()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_c_sandwich ( Real xi_m,
Real xi_p )

Definition at line 103 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nbc_pp_sw()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_pp_sw ( Real xi_m,
Real xi_p )

Definition at line 107 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nbc_mp_sw()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_mp_sw ( Real xi_m,
Real xi_p )

Definition at line 111 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_D_sandwich_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_D_sandwich_avg ( Real xi_m,
Real xi_p )

Definition at line 115 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_N_c_sandwich_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_N_c_sandwich_avg ( Real xi_m,
Real xi_p )

Definition at line 119 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nbc_pp_sw_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_pp_sw_avg ( Real xi_m,
Real xi_p )

Definition at line 123 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ poly_Nbc_mp_sw_avg()

template<class Real>
PECLET_CORE_CC_HD Real peclet::core::scheme::poly_Nbc_mp_sw_avg ( Real xi_m,
Real xi_p )

Definition at line 127 of file cut_cell_closure.hpp.

References PECLET_CORE_CC_HD.

◆ triPositiveFraction()

PECLET_CORE_CC_HD double peclet::core::scheme::triPositiveFraction ( double a,
double b,
double c )

Fraction of a triangle on which the linear interpolant of its vertex values (a, b, c) is strictly positive.

Robust case formulas (§2.2), no subtraction of close numbers; the vertex rotation mirrors flow's ccTriFrac.

Definition at line 145 of file cut_cell_geometry.hpp.

References PECLET_CORE_CC_HD, and peclet::core::scheme::detail::triOnePositive().

Referenced by fanFaceAperture().

◆ tetPositiveFraction()

PECLET_CORE_CC_HD double peclet::core::scheme::tetPositiveFraction ( double v0,
double v1,
double v2,
double v3 )

Fraction of a tetrahedron on which the linear interpolant of its vertex values is strictly positive (§2.2).

Vertices with value exactly 0 count as non-positive (solid).

Definition at line 170 of file cut_cell_geometry.hpp.

References PECLET_CORE_CC_HD, peclet::core::scheme::detail::tetOnePositive(), and peclet::core::scheme::detail::tetTwoPositive().

Referenced by cutCellGeometryFanTet().

◆ fanFaceAperture()

PECLET_CORE_CC_HD double peclet::core::scheme::fanFaceAperture ( double v00,
double v10,
double v11,
double v01,
double cc )

PL aperture of one face from its fan (§2.2): the corner values in loop order c00, c10, c11, c01 over the face's tangent axes (t1 < t2) and the face-centre value cc, ¼ (F(c00,c10,cc) + F(c10,c11,cc) + F(c11,c01,cc) + F(c01,c00,cc)), summed in that order.

The face kernel of a container and cutCellGeometryFanTet both call this, so a face's aperture is the same bits from either cell and from the face kernel.

Definition at line 196 of file cut_cell_geometry.hpp.

References PECLET_CORE_CC_HD, and triPositiveFraction().

Referenced by cutCellGeometryFanTet().

◆ snapAperture()

PECLET_CORE_CC_HD double peclet::core::scheme::snapAperture ( double a)

Snap a face aperture at both ends (§2.3): a < 1e-3 → 0, a > 1 − 1e-3 → 1, else a.

Definition at line 203 of file cut_cell_geometry.hpp.

References kApertureSnap, and PECLET_CORE_CC_HD.

◆ cutCellFaceArea()

PECLET_CORE_CC_HD double peclet::core::scheme::cutCellFaceArea ( int a,
const double h[3] )

Face area of axis a for cell size h: the product of the two other spacings.

Definition at line 212 of file cut_cell_geometry.hpp.

References PECLET_CORE_CC_HD.

Referenced by cutCellGeometryFanTet(), and facetAreaVector().

◆ facetAreaVector()

PECLET_CORE_CC_HD void peclet::core::scheme::facetAreaVector ( const double ap[6],
const double h[3],
double out[3] )

The area vector the apertures imply through the divergence theorem (§2.3): out_a = A_a (ap[2a+1] − ap[2a]), A_a the a-face area.

Applied to the UNSNAPPED apertures it is areaPL (the PL identity); applied to the snapped ones it is the operator's A⃗^snap.

Definition at line 219 of file cut_cell_geometry.hpp.

References cutCellFaceArea(), and PECLET_CORE_CC_HD.

◆ cutCellGeometryFanTet()

PECLET_CORE_CC_HD CutCellGeometry peclet::core::scheme::cutCellGeometryFanTet ( const double corner[8],
const double face[6],
double centre,
const double h[3] )

The cut-cell record of one cell from its 15 PL samples (§2.2): corner[8] (index bx+2by+4bz), face[6] (−x,+x,−y,+y,−z,+z), the centre value, and the cell size h[3] (internal lengths).

  • κ = (1/24) Σ_tets F_tet; aperture_f = ¼ Σ_{4 fan triangles of f} F_tri (unsnapped).
  • Pieces: the zero set of each cut tetrahedron; pieces with area < 1e-14 · min_a A_a dropped. areaPL = Σ piece vectors, areaSum = Σ |piece|, ρ = |areaPL| / areaSum.
  • ρ ≥ 0.5 → single (facet 0 = areaPL at the areaSum-weighted piece centroid). Otherwise the pieces split into two groups by the sign of n_piece · n_ref (n_ref = the largest piece; a piece with n_piece · n_ref ≥ 0 joins the reference group A, which is facet 0) — gap if (x̄_B − x̄_A) · n_A > 0, else thinSolid; an empty group falls back to single.

Definition at line 373 of file cut_cell_geometry.hpp.

References peclet::core::scheme::CutCellGeometry::aperture, peclet::core::scheme::CutCellGeometry::areaPL, peclet::core::scheme::CutCellGeometry::areaSum, peclet::core::scheme::detail::ccgFanCorner(), peclet::core::scheme::detail::ccgFanTet(), peclet::core::scheme::detail::ccgNorm(), peclet::core::scheme::detail::ccgTetPiece(), cutCellFaceArea(), peclet::core::dot(), peclet::core::scheme::CutCellGeometry::facetArea, peclet::core::scheme::CutCellGeometry::facetCentroid, fanFaceAperture(), gap, peclet::core::scheme::CutCellGeometry::kappa, peclet::core::scheme::CutCellGeometry::kind, kPieceDropRel, kSingleFacetRho, peclet::core::scheme::CutCellGeometry::nFacet, none, PECLET_CORE_CC_HD, single, tetPositiveFraction(), and thinSolid.

◆ gpPolyD()

PECLET_CORE_GP_HD float peclet::core::scheme::gpPolyD ( float xi)

Definition at line 56 of file ghost_closure.hpp.

References PECLET_CORE_GP_HD.

Referenced by gpClassifyFace(), and gpOrderWeights().

◆ gpPolyNc()

PECLET_CORE_GP_HD float peclet::core::scheme::gpPolyNc ( float xi)

Definition at line 59 of file ghost_closure.hpp.

References PECLET_CORE_GP_HD.

Referenced by gpClassifyFace(), and gpOrderWeights().

◆ gpPolyNnb()

PECLET_CORE_GP_HD float peclet::core::scheme::gpPolyNnb ( float xi)

Definition at line 62 of file ghost_closure.hpp.

References PECLET_CORE_GP_HD.

Referenced by gpClassifyFace(), and gpOrderWeights().

◆ gpNan()

PECLET_CORE_GP_HD float peclet::core::scheme::gpNan ( )

Definition at line 69 of file ghost_closure.hpp.

References PECLET_CORE_GP_HD.

Referenced by gpFillRow().

◆ gpFinite()

PECLET_CORE_GP_HD bool peclet::core::scheme::gpFinite ( float x)

Definition at line 76 of file ghost_closure.hpp.

References PECLET_CORE_GP_HD.

Referenced by gpClassifyFace().

◆ gpOrderWeights()

PECLET_CORE_GP_HD void peclet::core::scheme::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.

order=2 uses the wall-anchored quadratic (only available for GP_QUAD faces); order=1 (or a GP_LIN face) uses the wall-anchored linear closure th*u_g = u_bc + (th-1)*u_near. D is the conditioning factor feeding the row rescale.

Definition at line 84 of file ghost_closure.hpp.

References GP_BC_ONLY, GP_QUAD, gpPolyD(), gpPolyNc(), gpPolyNnb(), and PECLET_CORE_GP_HD.

Referenced by gpFillRow().

◆ gpClassifyFace()

PECLET_CORE_GP_HD GpFace peclet::core::scheme::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.

sg = ghost (this) face sdf sn = near face sdf (the cell's other face on this axis) sf = far face sdf sb = beyond-ghost face sdf (one further into the solid) snb = neighbor center sdf sc1/sc2 = centers needed by the near/far face gradients otherSolid = the cell's other face on this axis is solid (sandwich detection) exStd/exSliver = optional EXACT wall-crossing thetas (analytic-SDF capability) for the standard-ghost / extended-sliver branches; NaN falls back to the linear-interp theta. Pure function of the samples — shared verbatim between flow's uniform grid, the host parity tests, and the AMR octree band.

Definition at line 118 of file ghost_closure.hpp.

References peclet::core::scheme::GpFace::D, GP_BC_ONLY, GP_COUPLED, GP_EXPLICIT, GP_LIN, GP_QUAD, GP_THETA_MIN, gpFinite(), gpPolyD(), gpPolyNc(), gpPolyNnb(), PECLET_CORE_GP_HD, peclet::core::scheme::GpFace::state, peclet::core::scheme::GpFace::th, peclet::core::scheme::GpFace::w1, peclet::core::scheme::GpFace::w2, and peclet::core::scheme::GpFace::wbc.

Referenced by gpFillRow().

◆ gpFillRow()

template<class OV, class CellId>
PECLET_CORE_GP_HD bool peclet::core::scheme::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.

F[a][m+1] = face sdf at face index i+m (m = -1..2, face i+m sits between centers i+m-1 and i+m); Cq[a][q+2] = center sdf at i+q (q = -2..2; Cq[a][2] = own center, fluid by construction). Face slot k = 2*axis + (0 = plus side, 1 = minus side). Fills BOTH weight sets: w_* at rhsOrder (divergence RHS + diagnostic) and wm_* at matrixOrder (implicit phi couplings); the row rescale comes from the matrix weights (it conditions the matrix row). The overlay type OV must expose cell/rescale/coupled/state/th/w_bc/w_n1/w_n2/wm_n1/wm_n2 (indexable SoA — flow's GpOverlayT or the AMR overlay), with cellId whatever cell handle the consumer uses. Returns true if any face is non-COUPLED (i.e. the row belongs in the overlay).

Definition at line 175 of file ghost_closure.hpp.

References GP_COUPLED, GP_EXPLICIT, GP_LIN, GP_QUAD, gpClassifyFace(), gpNan(), gpOrderWeights(), PECLET_CORE_GP_HD, peclet::core::scheme::GpFace::state, and peclet::core::scheme::GpFace::th.

◆ probeSupport()

PECLET_CORE_CC_HD double peclet::core::scheme::probeSupport ( const double n[3],
const double h[3] )

S(n) = ½ Σ_a |n_a| h_a: the support half-width of a cell of size h along the unit normal n (§3.1).

A cell whose centre lies at signed distance ≥ −S(n) from a plane meets its positive half-space.

Definition at line 75 of file probe_flux.hpp.

References PECLET_CORE_CC_HD.

Referenced by buildProbe().

◆ trilinearStencil()

PECLET_CORE_CC_HD void peclet::core::scheme::trilinearStencil ( const double xi[3],
int base[3],
double w[8] )

Trilinear stencil of the index-space point ξ (cell centres at integer ξ, relative to the facet's cell): base = floor(ξ), and w[k] for the cell base + (k & 1, (k >> 1) & 1, k >> 2), w[k] = Π_a (bit_a ?

f_a : 1 − f_a) with f = ξ − base. Reproduces linear fields exactly.

Definition at line 97 of file probe_flux.hpp.

References PECLET_CORE_CC_HD, and peclet::core::scheme::detail::probeFloor().

Referenced by peclet::core::scheme::detail::probeCandidate().

◆ buildProbe()

template<class Lookup>
PECLET_CORE_CC_HD ProbeResult peclet::core::scheme::buildProbe ( const double xw[3],
const double n[3],
const double h[3],
const Lookup & L )

Build the probe of one facet by the ladder of §3.3.

xw is the facet centroid relative to its cell centre and n the unit normal INTO the probed phase (the solid side passes −n, the solid flags and −φ through its own Lookup); both in internal lengths, h the cell size. Lookup provides bool unknown(int dx, int dy, int dz) const (lattice offset from the facet's cell) and double phi(const double xi[3]) const (the phase-signed SDF at the index-space point ξ relative to the cell, in internal lengths).

Definition at line 158 of file probe_flux.hpp.

References gap, kProbeClearance, kProbeGapMin, kProbeMinKeptWeight, kProbeR0, kProbeR1a, kProbeR1b, kProbeR2, kProbeSigma, kProbeSigmaLast, kProbeSigmaLong, peclet::core::scheme::ProbeResult::n, peclet::core::scheme::ProbeResult::off, PECLET_CORE_CC_HD, peclet::core::scheme::detail::probeAllUnknown(), peclet::core::scheme::detail::probeCandidate(), peclet::core::scheme::detail::probeFillAll(), probeSupport(), peclet::core::scheme::ProbeResult::rung, peclet::core::scheme::ProbeResult::s, and peclet::core::scheme::ProbeResult::w.

◆ wallConductance()

PECLET_CORE_CC_HD double peclet::core::scheme::wallConductance ( double s,
double L,
double k )

Wall conductance of a Robin facet (§1.4): G = 1 / (s/L + 1/k), the flux out of the fluid per area being G (u_p − g).

k = 0 is Neumann (G = 0), k = +inf Dirichlet (G = L/s). s is the probe distance and L the phase conductivity (Λ_f = D).

Definition at line 229 of file probe_flux.hpp.

References PECLET_CORE_CC_HD.

◆ interfaceConductance()

PECLET_CORE_CC_HD double peclet::core::scheme::interfaceConductance ( double sf,
double Lf,
double Rc,
double ss,
double Ls )

Conjugate interface conductance (§1.4): the series resistance of the fluid probe leg, the contact resistance and the solid probe leg, G_c = 1 / (s_f/Λ_f + R_c + s_s/Λ_s), so that the flux from solid to fluid is G_c (u_ps − u_pf) in the ψ form.

Definition at line 241 of file probe_flux.hpp.

References PECLET_CORE_CC_HD.

Variable Documentation

◆ kApertureSnap

double peclet::core::scheme::kApertureSnap = 1e-3
inlineconstexpr

Aperture snap threshold at BOTH ends (§2.3): a < 1e-3 → 0, a > 1 − 1e-3 → 1.

The 1e-3 floor is flow's pressure constant; snapping both ends keeps a_s = 1 − a^snap exact (linear exactness).

Definition at line 46 of file cut_cell_geometry.hpp.

Referenced by snapAperture().

◆ kPieceDropRel

double peclet::core::scheme::kPieceDropRel = 1e-14
inlineconstexpr

A facet piece with area < kPieceDropRel · min_a A_a is dropped (§2.2).

Definition at line 48 of file cut_cell_geometry.hpp.

Referenced by cutCellGeometryFanTet().

◆ kSingleFacetRho

double peclet::core::scheme::kSingleFacetRho = 0.5
inlineconstexpr

ρ = |areaPL| / areaSum at or above which the cell carries ONE facet (§2.2).

Definition at line 50 of file cut_cell_geometry.hpp.

Referenced by cutCellGeometryFanTet().

◆ GP_THETA_MIN

float peclet::core::scheme::GP_THETA_MIN = 1e-4f
constexpr

Definition at line 44 of file ghost_closure.hpp.

Referenced by gpClassifyFace().

◆ kProbeR0

int peclet::core::scheme::kProbeR0 = 0
inlineconstexpr

Ladder rungs, in ProbeResult::rung (flow stores them as uint8).

Definition at line 40 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeR1a

int peclet::core::scheme::kProbeR1a = 1
inlineconstexpr

Definition at line 41 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeR1b

int peclet::core::scheme::kProbeR1b = 2
inlineconstexpr

Definition at line 42 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeR2

int peclet::core::scheme::kProbeR2 = 3
inlineconstexpr

Definition at line 43 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeSigma

double peclet::core::scheme::kProbeSigma = 1.1
inlineconstexpr

Probe distance factors on S(n) (§3.1, §3.3): R0 = 1.1, R1a = 1.5, R2 = 0.5.

Definition at line 46 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeSigmaLong

double peclet::core::scheme::kProbeSigmaLong = 1.5
inlineconstexpr

Definition at line 47 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeSigmaLast

double peclet::core::scheme::kProbeSigmaLast = 0.5
inlineconstexpr

Definition at line 48 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeWeightEps

double peclet::core::scheme::kProbeWeightEps = 1e-12
inlineconstexpr

V1 ignores stencil cells whose weight is at most this.

Definition at line 50 of file probe_flux.hpp.

Referenced by peclet::core::scheme::detail::probeAllUnknown().

◆ kProbeClearance

double peclet::core::scheme::kProbeClearance = 0.5
inlineconstexpr

V2: φ_phase(p) ≥ kProbeClearance · s.

Definition at line 52 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeReach

int peclet::core::scheme::kProbeReach = 2
inlineconstexpr

V3: every stencil cell within ±kProbeReach cells on each axis (the G = 2 halo).

Definition at line 54 of file probe_flux.hpp.

Referenced by peclet::core::scheme::detail::probeCandidate().

◆ kProbeGapMin

double peclet::core::scheme::kProbeGapMin = 0.2
inlineconstexpr

R1b is attempted only when the estimated gap w exceeds kProbeGapMin · S(n) ...

Definition at line 56 of file probe_flux.hpp.

Referenced by buildProbe().

◆ kProbeMinKeptWeight

double peclet::core::scheme::kProbeMinKeptWeight = 0.5
inlineconstexpr

... and accepted only when the kept weights sum to at least kProbeMinKeptWeight.

Definition at line 58 of file probe_flux.hpp.

Referenced by buildProbe().