|
core 0.5.0
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
Cell-centered FV Poisson operator on one (periodic) block octree. More...
#include <poisson.hpp>
Classes | |
| struct | FvAssembled |
| The assembled FV (weight-CSR) operator: per-face conductance w = A_f/d_f·openness, per-cell invVol and Dirichlet boundary diagonal, in the exact face order forEachFaceNeighbor emits. More... | |
Public Types | |
| using | Octree = BlockOctree< Dim, Bits > |
| using | M = typename Octree::M |
| using | Code = typename Octree::Code |
| using | Coord = typename Octree::Coord |
| using | ExtResolver = std::function< Index(const std::array< long, Dim > &)> |
| Route probes that exit the block through an external resolver (the LeafHalo registry): fn(blockLocalProbe as longs, possibly negative / beyond the block) → covering extended slot (local leaf or ghost in [n, n+nGhost)), LeafHalo::kPending (−2) during the discovery fixpoint, or −1 past a non-periodic edge. | |
Public Member Functions | |
| AmrPoisson ()=default | |
| AmrPoisson (const Octree &t, Real h0) | |
| void | init (const Octree &t, Real h0) |
| void | setOrigin (const Vec< Dim > &o) |
| void | setResolver (ExtResolver r) |
| void | setGhosts (std::vector< std::array< long, Dim > > lo, std::vector< unsigned > lv) |
| Declare the ghost slots [n, n+nGhost): block-local lo corner (longs — ghosts lie outside the block) and covering-leaf level. | |
| Index | numGhosts () const |
| void | setFrameShift (const std::array< long, Dim > &s) |
| Distributed frame shift: this block's global fine origin. | |
| unsigned | levelOf (Index slot) const |
| Octree level of an extended slot (local leaf or declared ghost). | |
| std::array< long, Dim > | loOf (Index slot) const |
| Block-local lo corner of an extended slot as longs (ghosts may lie outside the block). | |
| std::pair< Index, unsigned > | probeSlot (const std::array< long, Dim > &p) const |
| Covering slot + level of a block-local probe (longs, possibly outside the block). | |
| double | faceOpenness (Index i, int axis, int dir) const |
Openness of leaf i's face on (axis,dir); 1 if no openness has been set. | |
| bool | hasOpenness () const |
| const std::vector< double > & | opennessRaw () const |
| void | setOpennessRaw (std::vector< double > a) |
| template<class OpenFn > | |
| void | buildOpenness (OpenFn &&openFn) |
| Build face openness from a geometry callable openFn(faceCentreWorld, axis) -> [0,1] (1 = fully fluid, 0 = fully solid). | |
| Index | numLeaves () const |
| void | setPeriodic (bool p) |
Boundary condition: periodic (default) wraps every face; non-periodic treats a domain-boundary face as a homogeneous Dirichlet wall at half a cell (see boundaryDiag), which forEachFaceNeighbor then skips (no neighbour cell). | |
| bool | periodic () const |
| void | setImmersedWall (bool w) |
| Immersed no-slip (Dirichlet) wall mode. | |
| bool | immersedWall () const |
| double | boundaryDiag (Index i) const |
Σ over leaf i's Dirichlet-wall faces of the wall weight A_f/(½·cellWidth), folded into the operator diagonal so a wall cell sees a u=0 wall at half a cell (making the operator non-singular). | |
| Real | cellWidth (Index i) const |
| Real | cellVolume (Index i) const |
| template<class Fn > | |
| void | forEachFaceNeighbor (Index i, Fn &&fn) const |
Visit each face neighbour of leaf i: fn(neighbourSlot, coeff, axis, alpha) where coeff = A_f / d_f (physical) and alpha is the face openness (fluid fraction, from the finer side). | |
| template<class Fn > | |
| void | forEachFaceFull (Index i, Fn &&fn) const |
| Like forEachFaceNeighbor but exposes geometry for a consistent FV divergence/gradient: fn(neighbour, axis, dir, areaPhys, distPhys, alpha). | |
| Index | periodicNeighbor (Index i, int axis, int dir) const |
| Periodic face neighbour leaf (covering the cell just across the face). | |
| double | coarseStar (const std::vector< double > &u, Index coarse, Index fine, int axis) const |
Quadratic coarse-fine value: the coarse leaf coarse's field, evaluated by tangential quadratic interpolation at the tangential position of fine leaf fine (Martin–Cartwright). | |
| void | applyLaplacianQuad (const std::vector< double > &u, std::vector< double > &out) const |
| out = L u with the quadratic coarse-fine flux (2nd-order at 2:1 interfaces). | |
| double | residualQuad (const std::vector< double > &u, const std::vector< double > &rhs, std::vector< double > &res) const |
| L2 norm of rhs - L_quad u. | |
| FvAssembled | assembleFv () const |
| FvCsrOpT< HostArr< double >, HostArr< Index > > | hostFvOp (const FvAssembled &A) const |
| View an FvAssembled as the backend-agnostic FvCsrOpT (c0=0,cD=1 ⇒ pure FV Laplacian). | |
| void | applyFvShared (const std::vector< double > &u, std::vector< double > &out) const |
| out = L u via the SHARED face_csr.hpp FV kernel over the assembled CSR — the same arithmetic the device applyFv runs, executed serially. | |
| void | applyLaplacian (const std::vector< double > &u, std::vector< double > &out) const |
| out = L u (periodic FV Laplacian). | |
| double | residual (const std::vector< double > &u, const std::vector< double > &rhs, std::vector< double > &res) const |
| res = rhs - L u, returns its L2 norm (sqrt(sum V_i res_i^2)). | |
| void | gaussSeidel (std::vector< double > &u, const std::vector< double > &rhs, int sweeps) const |
sweeps lexicographic Gauss-Seidel relaxations of L u = rhs (in place). | |
| void | removeMean (std::vector< double > &u) const |
| Subtract the volume-weighted mean (fixes the periodic null space). | |
| const Octree & | octree () const |
| Real | h0 () const |
| const std::array< Coord, Dim > & | fineExt () const |
| Per-axis fine-grid extent (brick·2^lmax) — the periodic wrap modulus. | |
| const Vec< Dim > & | origin () const |
Static Public Member Functions | |
| static int | faceIndex (int axis, int dir) |
Static Public Attributes | |
| static constexpr int | kFaces = 2 * Dim |
Cell-centered FV Poisson operator on one (periodic) block octree.
Definition at line 44 of file poisson.hpp.
| using peclet::core::amr::AmrPoisson< Dim, Bits >::Octree = BlockOctree<Dim, Bits> |
Definition at line 46 of file poisson.hpp.
| using peclet::core::amr::AmrPoisson< Dim, Bits >::M = typename Octree::M |
Definition at line 47 of file poisson.hpp.
| using peclet::core::amr::AmrPoisson< Dim, Bits >::Code = typename Octree::Code |
Definition at line 48 of file poisson.hpp.
| using peclet::core::amr::AmrPoisson< Dim, Bits >::Coord = typename Octree::Coord |
Definition at line 49 of file poisson.hpp.
| using peclet::core::amr::AmrPoisson< Dim, Bits >::ExtResolver = std::function<Index(const std::array<long, Dim>&)> |
Route probes that exit the block through an external resolver (the LeafHalo registry): fn(blockLocalProbe as longs, possibly negative / beyond the block) → covering extended slot (local leaf or ghost in [n, n+nGhost)), LeafHalo::kPending (−2) during the discovery fixpoint, or −1 past a non-periodic edge.
Unset (default) = periodic BLOCK wrap — the single-rank behaviour, bit-identical (block == domain). Distributed use is periodic-domain only for now (AmrFlow is periodic-only).
Definition at line 76 of file poisson.hpp.
|
default |
|
inline |
Definition at line 52 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::h0(), peclet::core::amr::AmrPoisson< Dim, Bits >::init(), and peclet::core::amr::transferFieldGradients().
Definition at line 54 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::h0(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::AmrPoisson(), peclet::core::amr::AmrCutCell< Bits >::build(), peclet::core::amr::AmrFlow< Bits >::setSolid(), and peclet::core::amr::oracle::AmrFlow< Bits >::setSolid().
|
inline |
Definition at line 67 of file poisson.hpp.
References peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrFlow< Bits >::setSolid(), and peclet::core::amr::oracle::AmrFlow< Bits >::setSolid().
|
inline |
Definition at line 77 of file poisson.hpp.
References peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrCutCell< Bits >::build(), and peclet::core::amr::AmrFlow< Bits >::prepareDistributed().
|
inline |
Declare the ghost slots [n, n+nGhost): block-local lo corner (longs — ghosts lie outside the block) and covering-leaf level.
buildOpenness then fills ghost α rows from the same world-coord openFn (evaluated in the GLOBAL frame, see setFrameShift, so the value matches the owner's bit-for-bit); levelOf / loOf / periodicNeighbor serve ghost slots transparently.
Definition at line 82 of file poisson.hpp.
References peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrCutCell< Bits >::build(), and peclet::core::amr::AmrFlow< Bits >::installGhostMeta().
|
inline |
Definition at line 86 of file poisson.hpp.
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::buildOpenness().
|
inline |
Distributed frame shift: this block's global fine origin.
Every world-coordinate evaluation (openness face centroids) computes origin_ + (localCoord + shift)·h0 with origin_ the GLOBAL origin, so all ranks evaluate the geometry at bit-identical points (float non-associativity would otherwise break the symmetric-openFn contract at cut faces). Default 0 = single-rank (local coords are global).
Definition at line 92 of file poisson.hpp.
References peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrCutCell< Bits >::build(), and peclet::core::amr::AmrFlow< Bits >::prepareDistributed().
|
inline |
Octree level of an extended slot (local leaf or declared ghost).
Definition at line 94 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::level(), and peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacianQuad(), peclet::core::amr::AmrPoisson< Dim, Bits >::cellWidth(), peclet::core::amr::AmrPoisson< Dim, Bits >::coarseStar(), peclet::core::amr::AmrPoisson< Dim, Bits >::periodicNeighbor(), and peclet::core::amr::AmrPoisson< Dim, Bits >::probeSlot().
|
inline |
Block-local lo corner of an extended slot as longs (ghosts may lie outside the block).
Definition at line 100 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::bounds(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::coarseStar(), and peclet::core::amr::AmrPoisson< Dim, Bits >::periodicNeighbor().
|
inline |
Covering slot + level of a block-local probe (longs, possibly outside the block).
In-block: local find (the fast path, unchanged). Out-of-block: periodic block wrap when no resolver is set (single-rank: block == domain), else the external resolver. A negative slot (kPending/kNone during the distributed discovery fixpoint) carries level 0; callers skip those entries — a finished distributed build never sees one.
Definition at line 117 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::find(), peclet::core::amr::BlockOctree< Dim, Bits >::level(), peclet::core::amr::AmrPoisson< Dim, Bits >::levelOf(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceFull(), peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor(), and peclet::core::amr::AmrPoisson< Dim, Bits >::periodicNeighbor().
Definition at line 144 of file poisson.hpp.
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::buildOpenness(), and peclet::core::amr::AmrPoisson< Dim, Bits >::faceOpenness().
|
inline |
Openness of leaf i's face on (axis,dir); 1 if no openness has been set.
Definition at line 147 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::faceIndex(), peclet::core::amr::AmrPoisson< Dim, Bits >::kFaces, and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::boundaryDiag(), peclet::core::amr::AmrPoisson< Dim, Bits >::coarseStar(), peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceFull(), and peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor().
|
inline |
Definition at line 153 of file poisson.hpp.
Referenced by peclet::core::amr::assembleFaceGeom(), and peclet::core::amr::assembleFv().
|
inline |
Definition at line 154 of file poisson.hpp.
Referenced by peclet::core::amr::assembleFaceGeom(), and peclet::core::amr::assembleFv().
|
inline |
Definition at line 155 of file poisson.hpp.
References peclet::core::amr::transferFieldGradients().
|
inline |
Build face openness from a geometry callable openFn(faceCentreWorld, axis) -> [0,1] (1 = fully fluid, 0 = fully solid).
Evaluated at each face centroid, so same-level neighbours see an identical value (consistent shared faces).
Definition at line 164 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::bounds(), peclet::core::amr::AmrPoisson< Dim, Bits >::faceIndex(), peclet::core::amr::AmrPoisson< Dim, Bits >::kFaces, peclet::core::amr::BlockOctree< Dim, Bits >::level(), peclet::core::amr::AmrPoisson< Dim, Bits >::numGhosts(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrFlow< Bits >::setSolid(), and peclet::core::amr::oracle::AmrFlow< Bits >::setSolid().
|
inline |
Definition at line 200 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::numLeaves().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyFvShared(), peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacian(), peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacianQuad(), peclet::core::amr::AmrPoisson< Dim, Bits >::assembleFv(), peclet::core::amr::AmrPoisson< Dim, Bits >::buildOpenness(), peclet::core::amr::AmrPoisson< Dim, Bits >::gaussSeidel(), peclet::core::amr::AmrPoisson< Dim, Bits >::hostFvOp(), peclet::core::amr::AmrPoisson< Dim, Bits >::levelOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::loOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::removeMean(), peclet::core::amr::AmrPoisson< Dim, Bits >::residual(), and peclet::core::amr::AmrPoisson< Dim, Bits >::residualQuad().
|
inline |
Boundary condition: periodic (default) wraps every face; non-periodic treats a domain-boundary face as a homogeneous Dirichlet wall at half a cell (see boundaryDiag), which forEachFaceNeighbor then skips (no neighbour cell).
Definition at line 205 of file poisson.hpp.
|
inline |
Definition at line 206 of file poisson.hpp.
Referenced by peclet::core::amr::assembleFaceGeom(), and peclet::core::amr::assembleFv().
|
inline |
Immersed no-slip (Dirichlet) wall mode.
OFF (default) ⇒ the Neumann/openness operator (the pressure Poisson): a solid-adjacent face just loses its flux (α<1). ON ⇒ the velocity operator: the solid fraction (1−α) of every interior face is a u=0 wall at half a cell, folded into the diagonal (boundaryDiag). This is the one difference between the pressure and velocity discretisations on the same openness geometry, and it makes the velocity operator strongly diagonally dominant (the wall pins u) — the basis for the velocity multigrid (Multigrid built with immersedWall + Helmholtz mass).
Definition at line 215 of file poisson.hpp.
|
inline |
Definition at line 216 of file poisson.hpp.
Referenced by peclet::core::amr::assembleFv().
|
inline |
Σ over leaf i's Dirichlet-wall faces of the wall weight A_f/(½·cellWidth), folded into the operator diagonal so a wall cell sees a u=0 wall at half a cell (making the operator non-singular).
Two contributions: domain-boundary faces weighted by α (only when non-periodic), and — when immersedWall_ — the solid fraction (1−α) of every interior face (the immersed no-slip wall of the velocity operator).
Definition at line 223 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::bounds(), peclet::core::amr::AmrPoisson< Dim, Bits >::faceOpenness(), peclet::core::amr::BlockOctree< Dim, Bits >::level(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::assembleFv().
|
inline |
Definition at line 245 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::levelOf(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::buildCfDivDelta(), peclet::core::amr::buildCfUfDelta(), peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), and peclet::core::amr::AmrPoisson< Dim, Bits >::coarseStar().
|
inline |
Definition at line 246 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellWidth(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacian(), peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacianQuad(), peclet::core::amr::AmrPoisson< Dim, Bits >::assembleFv(), peclet::core::amr::AmrCutCell< Bits >::assembleOperator(), peclet::core::amr::AmrCutCell< Bits >::buildAdvectionFou(), peclet::core::amr::buildCfDivDelta(), peclet::core::amr::buildCfLapDelta(), peclet::core::amr::buildFaceGeom(), peclet::core::amr::oracle::AmrFlow< Bits >::divergence(), peclet::core::amr::oracle::AmrFlow< Bits >::divNormFace(), peclet::core::amr::AmrPoisson< Dim, Bits >::gaussSeidel(), peclet::core::amr::AmrCutCell< Bits >::gaussSeidelGeometric(), peclet::core::amr::AmrPoisson< Dim, Bits >::removeMean(), peclet::core::amr::AmrPoisson< Dim, Bits >::residual(), and peclet::core::amr::AmrPoisson< Dim, Bits >::residualQuad().
|
inline |
Visit each face neighbour of leaf i: fn(neighbourSlot, coeff, axis, alpha) where coeff = A_f / d_f (physical) and alpha is the face openness (fluid fraction, from the finer side).
Periodic wrap; 2:1 interfaces enumerated.
Definition at line 258 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::bounds(), peclet::core::amr::AmrPoisson< Dim, Bits >::faceOpenness(), peclet::core::amr::BlockOctree< Dim, Bits >::level(), peclet::core::amr::AmrPoisson< Dim, Bits >::probeSlot(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacian(), peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacianQuad(), peclet::core::amr::AmrPoisson< Dim, Bits >::assembleFv(), peclet::core::amr::AmrCutCell< Bits >::assembleOperator(), peclet::core::amr::buildCfLapDelta(), peclet::core::amr::AmrPoisson< Dim, Bits >::gaussSeidel(), peclet::core::amr::AmrCutCell< Bits >::gaussSeidelGeometric(), and peclet::core::amr::AmrPoisson< Dim, Bits >::residual().
|
inline |
Like forEachFaceNeighbor but exposes geometry for a consistent FV divergence/gradient: fn(neighbour, axis, dir, areaPhys, distPhys, alpha).
Same face enumeration (2:1 sub-faces) and openness as the operator, so a collocated projection built on it stays consistent with the pressure Poisson.
Definition at line 313 of file poisson.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::bounds(), peclet::core::amr::AmrPoisson< Dim, Bits >::faceOpenness(), peclet::core::amr::BlockOctree< Dim, Bits >::level(), peclet::core::amr::AmrPoisson< Dim, Bits >::probeSlot(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrCutCell< Bits >::buildAdvectionFou(), peclet::core::amr::buildCfDivDelta(), peclet::core::amr::buildCfGradDelta(), peclet::core::amr::buildCfUfDelta(), peclet::core::amr::oracle::AmrFlow< Bits >::buildFaceField(), peclet::core::amr::buildFaceGeom(), peclet::core::amr::oracle::AmrFlow< Bits >::divergence(), peclet::core::amr::oracle::AmrFlow< Bits >::divNormFace(), peclet::core::amr::AmrFlow< Bits >::prepareDistributed(), and peclet::core::amr::oracle::AmrFlow< Bits >::setSolid().
|
inline |
Periodic face neighbour leaf (covering the cell just across the face).
Works for ghost slots too (the ±2 overlay chains hop from ghosts), via loOf/levelOf.
Definition at line 358 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::levelOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::loOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::probeSlot(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::buildFaceGeom(), and peclet::core::amr::AmrPoisson< Dim, Bits >::coarseStar().
|
inline |
Quadratic coarse-fine value: the coarse leaf coarse's field, evaluated by tangential quadratic interpolation at the tangential position of fine leaf fine (Martin–Cartwright).
Replacing the raw coarse value with this in the two-point flux makes the C/F flux 2nd-order; both sides of the face use the identical value, so the operator stays symmetric/conservative (refluxing is automatic). Falls back to the raw value on any tangential axis whose coarse neighbours aren't both same-level.
Definition at line 372 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellWidth(), peclet::core::amr::AmrPoisson< Dim, Bits >::faceOpenness(), peclet::core::amr::AmrPoisson< Dim, Bits >::levelOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::loOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::periodicNeighbor(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacianQuad().
|
inline |
out = L u with the quadratic coarse-fine flux (2nd-order at 2:1 interfaces).
Definition at line 407 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::coarseStar(), peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor(), peclet::core::amr::BlockOctree< Dim, Bits >::level(), peclet::core::amr::AmrPoisson< Dim, Bits >::levelOf(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::residualQuad().
|
inline |
L2 norm of rhs - L_quad u.
Definition at line 429 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::applyLaplacianQuad(), peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
|
inline |
Definition at line 455 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::bcDiag, peclet::core::amr::AmrPoisson< Dim, Bits >::boundaryDiag(), peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::coef, peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor(), peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::invVol, peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::nbr, peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::start, and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyFvShared().
|
inline |
View an FvAssembled as the backend-agnostic FvCsrOpT (c0=0,cD=1 ⇒ pure FV Laplacian).
Definition at line 482 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::bcDiag, peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::coef, peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::invVol, peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::nbr, peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), peclet::core::amr::AmrPoisson< Dim, Bits >::FvAssembled::start, and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::applyFvShared().
|
inline |
out = L u via the SHARED face_csr.hpp FV kernel over the assembled CSR — the same arithmetic the device applyFv runs, executed serially.
The geometric applyLaplacian below is the oracle; test_amr_poisson asserts the two agree (anti-drift lock, no-Kokkos build).
Definition at line 495 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::assembleFv(), peclet::core::amr::fvApplyRow(), peclet::core::amr::AmrPoisson< Dim, Bits >::hostFvOp(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
|
inline |
out = L u (periodic FV Laplacian).
Definition at line 506 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
Referenced by peclet::core::amr::AmrCutCell< Bits >::applyOpGeometric().
|
inline |
res = rhs - L u, returns its L2 norm (sqrt(sum V_i res_i^2)).
Definition at line 520 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
|
inline |
sweeps lexicographic Gauss-Seidel relaxations of L u = rhs (in place).
Definition at line 539 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::forEachFaceNeighbor(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
|
inline |
Subtract the volume-weighted mean (fixes the periodic null space).
Definition at line 555 of file poisson.hpp.
References peclet::core::amr::AmrPoisson< Dim, Bits >::cellVolume(), peclet::core::amr::AmrPoisson< Dim, Bits >::numLeaves(), and peclet::core::amr::transferFieldGradients().
|
inline |
Definition at line 567 of file poisson.hpp.
Referenced by peclet::core::amr::buildFaceGeom().
|
inline |
Definition at line 568 of file poisson.hpp.
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::AmrPoisson(), peclet::core::amr::assembleFaceGeom(), peclet::core::amr::assembleFv(), and peclet::core::amr::AmrPoisson< Dim, Bits >::init().
|
inline |
Per-axis fine-grid extent (brick·2^lmax) — the periodic wrap modulus.
Needed by the device assembler to reproduce wrap() / the domain-boundary test on device.
Definition at line 571 of file poisson.hpp.
Referenced by peclet::core::amr::assembleFaceGeom(), and peclet::core::amr::assembleFv().
|
inline |
Definition at line 572 of file poisson.hpp.
|
staticconstexpr |
Definition at line 143 of file poisson.hpp.
Referenced by peclet::core::amr::AmrPoisson< Dim, Bits >::buildOpenness(), and peclet::core::amr::AmrPoisson< Dim, Bits >::faceOpenness().