|
core 1.8.1
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
|
core — the cut-cell geometric record of one cell from a piecewise-linear (PL) model of its signed distance field: fluid fraction, face apertures, facet area vectors and centroids. More...
Go to the source code of this file.
Classes | |
| struct | peclet::core::scheme::CutCellGeometry |
| The geometric record of one cell (§2.1). Double, cell-centred frame, internal lengths. More... | |
Namespaces | |
| namespace | peclet |
| namespace | peclet::core |
| namespace | peclet::core::scheme |
| namespace | peclet::core::scheme::detail |
Enumerations | |
| enum class | peclet::core::scheme::CutCellKind : int { peclet::core::scheme::none = 0 , peclet::core::scheme::single = 1 , peclet::core::scheme::gap = 2 , peclet::core::scheme::thinSolid = 3 } |
| Facet classification of a cut cell (§2.2). More... | |
Functions | |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::ccgSqrt (double x) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::ccgAbs (double x) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::ccgMaxAbs3 (double a, double b, double c) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::ccgMaxAbs4 (double a, double b, double c, double d) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::triOnePositive (double x, double y, double z) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::tetOnePositive (double a, double b1, double b2, double b3) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::tetTwoPositive (double a1, double a2, double b1, double b2) |
| 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. | |
| 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). | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| PECLET_CORE_CC_HD void | peclet::core::scheme::detail::ccgCornerPos (int c, const double h[3], double x[3]) |
| PECLET_CORE_CC_HD void | peclet::core::scheme::detail::ccgTangents (int a, int &t1, int &t2) |
| PECLET_CORE_CC_HD int | peclet::core::scheme::detail::ccgFanCorner (int f, int k) |
| PECLET_CORE_CC_HD void | peclet::core::scheme::detail::ccgFanTet (int f, int k, const double corner[8], const double face[6], double centre, const double h[3], double val[4], double pos[4][3]) |
| PECLET_CORE_CC_HD void | peclet::core::scheme::detail::ccgCross (double vp, double vn, const double xp[3], const double xn[3], double x[3]) |
| PECLET_CORE_CC_HD void | peclet::core::scheme::detail::ccgCrossProd (const double u[3], const double v[3], double w[3]) |
| PECLET_CORE_CC_HD double | peclet::core::scheme::detail::ccgNorm (const double v[3]) |
| PECLET_CORE_CC_HD bool | peclet::core::scheme::detail::ccgTetPiece (const double val[4], const double pos[4][3], double vec[3], double &area, double cen[3]) |
| 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). | |
Variables | |
| constexpr double | peclet::core::scheme::kApertureSnap = 1e-3 |
| Aperture snap threshold at BOTH ends (§2.3): a < 1e-3 → 0, a > 1 − 1e-3 → 1. | |
| constexpr double | peclet::core::scheme::kPieceDropRel = 1e-14 |
| A facet piece with area < kPieceDropRel · min_a A_a is dropped (§2.2). | |
| constexpr double | peclet::core::scheme::kSingleFacetRho = 0.5 |
| ρ = |areaPL| / areaSum at or above which the cell carries ONE facet (§2.2). | |
core — the cut-cell geometric record of one cell from a piecewise-linear (PL) model of its signed distance field: fluid fraction, face apertures, facet area vectors and centroids.
Design: flow doc/scalar_ibm_design.md §2 (decision D4, register entry "Scalar cut-cell geometry is the fan-tetrahedron PL model"). The record is container-free — scalars and small local arrays, no Kokkos::View, no grid indexing — so ONE copy serves flow's structured grid (WO-2) and amr's leaves (§7.3).
The PL model. A cell carries 15 samples of the SDF φ (internal length units): its 8 corners, its 6 face centres and its centre. Each face is split into 4 triangles (corner, next corner, face centre) — the triangle fan of flow's ccFaceOpenMS — and each triangle is coned to the cell centre, giving 24 tetrahedra of volume V/24. φ is linear on each. Shared faces carry identical fans, so the model is conforming across cells.
"Fluid" means φ > 0 strictly: a vertex with φ = 0 is solid, so a wall lying exactly on a face closes that face and κ = 0 never coexists with an open face.
κ, the six apertures and the facet pieces all come from that one polyhedron, so the PL divergence theorem holds to round-off:
Σ_a A_a (aperture_{a+} − aperture_{a−}) e_a = areaPL (A_a = face area)
Conventions. Frame = the cell centre at the origin, internal lengths, cell size h[3]. Corner index c = bx + 2·by + 4·bz (x fastest, the suite's axis order; bit set = high side), i.e. corner c sits at ((bx − ½)h_x, (by − ½)h_y, (bz − ½)h_z). Face order −x, +x, −y, +y, −z, +z. Area vectors point INTO the fluid. Everything is double (D7).
Host/device: PECLET_CORE_CC_HD (from scheme/cut_cell_closure.hpp) is KOKKOS_INLINE_FUNCTION when Kokkos_Core.hpp was included BEFORE this header, plain inline otherwise (host-only oracle builds).
Reserved, NOT implemented (design §7.1, §7.4): the plane source cutCellGeometryFromPlane(const double m[3], double alpha, const double h[3]) for PLIC cells.
Definition in file cut_cell_geometry.hpp.