core 0.5.0
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
ghost_projection_sampled.hpp File Reference
#include <array>
#include <cmath>
#include <cstdio>
#include <cstdint>
#include <vector>
#include "peclet/core/amr/block_octree.hpp"
#include "peclet/core/amr/ghost_projection.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::GhostOverlaySampled
 Sampled overlay: the classic per-row fields (weights, states, rescale — base; base.nbr is UNUSED) plus one linear functional per chain slot (r*15 + a*5 + (q+2)) in CSR form. More...
 

Namespaces

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

Functions

bool peclet::core::amr::detail::gpsSolveDense (int n, double *A, double *b)
 Gaussian elimination with partial pivoting (small dense normal equations).
 
void peclet::core::amr::detail::gpsMonomials (const double d[3], int deg, double *m, int &nm)
 
template<unsigned Bits, class SdfFn >
auto peclet::core::amr::makeBinaryOpenFnMixed (const BlockOctree< 3, Bits > &t, const AmrPoisson< 3, Bits > &pres, SdfFn sdfFn, double h0, Vec< 3 > origin)
 The canonical (sub)face openness for mixed-level cut bands: open iff both adjacent ACTUAL leaf centers are fluid AND the float mean of the center samples is >= 0.
 
template<unsigned Bits, class SdfFn >
GhostOverlaySampled peclet::core::amr::buildGhostOverlaySampled (const BlockOctree< 3, Bits > &t, const AmrPoisson< 3, Bits > &pres, SdfFn &&sdf, int matrixOrder, int rhsOrder, Vec< 3 > origin=Vec< 3 >{})
 Build the sampled overlay.
 
double peclet::core::amr::gpsSample (const GhostOverlaySampled &ov, Index r, int a, int q, const std::vector< double > &x)
 Evaluate slot (r, a, q) of a scalar leaf field. Empty functional reads 0.
 
void peclet::core::amr::ghostApplyDeltaSampledHost (const GhostOverlaySampled &ov, const std::vector< double > &x, std::vector< double > &y)
 Matrix overlay (sampled): y currently holds the BINARY L matvec; overwrite overlay rows with y = rho·(y + invh²·Delta) — the sampled analog of ghostApplyDeltaHost.
 
void peclet::core::amr::ghostDivergDeltaSampledHost (const GhostOverlaySampled &ov, const std::array< std::vector< double >, 3 > &u, std::vector< double > &d)
 Divergence overlay (sampled): the sampled analog of ghostDivergDeltaHost (u_bc = 0).
 
double peclet::core::amr::gpsDirGrad (const GhostOverlaySampled &ov, Index r, const std::vector< double > &fld, int c, double invh)
 Directional ghost cell-gradient on a sampled row (the mixed-level gradOfDir): the same cascade — central where both axis virtual neighbours are fluid, 2nd-order one-sided toward the fluid else (2-point fallback), 0 sandwiched — on the row's sample functionals, so the gradient reads virtual uniform-position values across a seam instead of degrading.