core 0.5.0
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
ghost_projection.hpp File Reference
#include <array>
#include <cstdint>
#include <stdexcept>
#include <vector>
#include "peclet/core/amr/block_octree.hpp"
#include "peclet/core/amr/poisson.hpp"
#include "peclet/core/common/types.hpp"
#include "peclet/core/scheme/ghost_closure.hpp"

Go to the source code of this file.

Classes

struct  peclet::core::amr::GhostOverlay
 Host ghost-projection overlay: one row per non-clean fluid leaf (== cut cell: some ±1 center sample solid). More...
 
struct  peclet::core::amr::detail::GhostOverlayRef
 
struct  peclet::core::amr::GhostOverlayDev
 Device mirror of GhostOverlay (uploaded once per setSolid). More...
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::amr
 
namespace  peclet::core::amr::detail
 

Functions

template<unsigned Bits>
GhostOverlay peclet::core::amr::buildGhostOverlay (const BlockOctree< 3, Bits > &t, const AmrPoisson< 3, Bits > &pres, const std::vector< double > &sdfC, int matrixOrder, int rhsOrder, bool *bandViolation=nullptr)
 Build the overlay from the octree + the cell-centered SDF samples (AmrCutCell::sdfCRaw — EXTENDED over the ghost slots in a distributed build, where pres carries the LeafHalo resolver seam and the chains may hop through ghosts).
 
template<class SdfFn >
auto peclet::core::amr::makeBinaryOpenFn (SdfFn sdfFn, double h0)
 Binary openness callable factory for the MG surrogate: a face is open iff both adjacent centers (probed at ±h0/2 along the face normal — the adjacent finest-leaf centers in the cut band; deep fluid elsewhere, where the probe distance is irrelevant) are fluid AND the float face sample (mean of the float center samples — the overlay's classification arithmetic) is fluid.
 
template<unsigned Bits>
std::vector< charpeclet::core::amr::findPocketCells (const BlockOctree< 3, Bits > &t, const AmrPoisson< 3, Bits > &pres, const std::vector< double > &sdfC)
 Fragmentation guard (the AMR port of flow's host-BFS pocket guard): the BINARY coupled-face graph (a face couples two cells iff its binary openness is 1) can FRAGMENT on tight-throat / enclosed geometries — each pocket then carries its own constant null vector and BiCGStab breaks down (fields → 1e152, measured in flow on RCP packings).
 
void peclet::core::amr::ghostApplyDeltaHost (const GhostOverlay &ov, const std::vector< double > &x, std::vector< double > &y)
 Matrix overlay: y currently holds the BINARY L matvec; overwrite the overlay rows with y = rho·(y + invh²·Delta_grid) (decoupled rows → 0).
 
void peclet::core::amr::ghostDivergDeltaHost (const GhostOverlay &ov, const std::array< std::vector< double >, 3 > &u, std::vector< double > &d)
 Divergence overlay: d currently holds the BINARY divergence (physical); overwrite overlay rows with d = rho·(d + invh·delta_div) (decoupled → 0).
 
GhostOverlayDev peclet::core::amr::uploadGhostOverlay (const GhostOverlay &h)
 
void peclet::core::amr::ghostApplyDelta (const GhostOverlayDev &ov, View< const double > x, View< double > y)
 Device matrix overlay (== ghostApplyDeltaHost). Distinct rows per thread: no atomics.
 
void peclet::core::amr::ghostDivergDelta (const GhostOverlayDev &ov, View< const double > u0, View< const double > u1, View< const double > u2, View< double > d)
 Device divergence overlay (== ghostDivergDeltaHost).