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

Go to the source code of this file.

Classes

struct  peclet::core::amr::CfCsr
 Scalar-input CSR overlay: out(i) += Σ_k coef·f(slot) over rows with C/F faces. More...
 
struct  peclet::core::amr::CfCompCsr
 Component-tagged CSR overlay (the divergence delta): out(i) += Σ_k coef·u[comp](slot). More...
 
struct  peclet::core::amr::detail::ScalarEnt
 
struct  peclet::core::amr::detail::CompEnt
 
struct  peclet::core::amr::CfUfDelta
 (uf_scheme − uf_std) for the div-free FACE field uf_k = ½(u_i+u_j) − (φ₊−φ₋)/d, one delta row per forEachFaceFull SLOT (cell-major enumeration — the FaceGeom / oracle faceStart CSR order, identical on both engines). More...
 
struct  peclet::core::amr::CfCsrDev
 Device mirror of a CfCsr (empty when the scheme is standard / no C/F rows). More...
 
struct  peclet::core::amr::CfCompCsrDev
 

Namespaces

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

Enumerations

enum class  peclet::core::amr::CfScheme : int { peclet::core::amr::standard = 0 , peclet::core::amr::quadratic = 1 }
 Coarse/fine interface scheme for the collocated flow operators. More...
 

Functions

template<unsigned Bits, class Ent , class FluidFn >
void peclet::core::amr::detail::cfAppendStencil (const AmrPoisson< 3, Bits > &ap, const BlockOctree< 3, Bits > &t, std::vector< Ent > &out, Index coarse, Index fine, int axis, double scale, FluidFn &&fluidOk, CfScheme scheme, const Ent &proto=Ent{})
 Append the scheme's (coarse* − coarse_raw) substitution stencil for ONE directed C/F sub-face to out, scaled.
 
template<class Ent , class Csr >
void peclet::core::amr::detail::compactCsr (const std::vector< std::vector< Ent > > &per, Csr &out, Index n)
 
template<unsigned Bits, class RowFn , class FluidFn >
CfCsr peclet::core::amr::buildCfLapDelta (const AmrPoisson< 3, Bits > &ap, const BlockOctree< 3, Bits > &t, double factor, RowFn &&rowOk, FluidFn &&fluidOk, CfScheme scheme)
 (∇²_scheme − ∇²_std) as a scalar CSR, ×factor (pass μ for the momentum deferred-correction RHS, 1 for a pressure-matrix delta): row i gains scale = factor·invV·(αA/d)·(±1) per directed C/F face (+ for a coarser neighbour's substituted value, − for our own value substituted at a finer sub-face) — the same construction as Multigrid's quad CSR.
 
template<unsigned Bits, class RowFn , class FluidFn >
CfCompCsr peclet::core::amr::buildCfDivDelta (const AmrPoisson< 3, Bits > &ap, const BlockOctree< 3, Bits > &t, RowFn &&rowOk, FluidFn &&fluidOk, CfScheme scheme)
 (D_scheme − D_std) for the face-average divergence div_i = invV·Σ α·A·dir·(face value).
 
template<unsigned Bits, class RowFn , class FluidFn >
std::array< CfCsr, 3 > peclet::core::amr::buildCfGradDelta (const AmrPoisson< 3, Bits > &ap, const BlockOctree< 3, Bits > &t, RowFn &&rowOk, FluidFn &&fluidOk, CfScheme scheme)
 (G_scheme − G_std) for the ABC cell gradient gradOf/grad3.
 
template<unsigned Bits, class FluidFn >
CfUfDelta peclet::core::amr::buildCfUfDelta (const AmrPoisson< 3, Bits > &ap, const BlockOctree< 3, Bits > &t, FluidFn &&fluidOk, CfScheme scheme)
 
void peclet::core::amr::cfApplyHost (const CfCsr &c, const std::vector< double > &f, std::vector< double > &out)
 out(i) += Σ coef·f(slot) (the scalar overlay: momentum ∇² delta, gradient delta per axis).
 
void peclet::core::amr::cfApplyCompHost (const CfCompCsr &c, const std::array< std::vector< double >, 3 > &u, std::vector< double > &out)
 out(i) += Σ coef·u[comp](slot) (the divergence overlay).
 
CfCsrDev peclet::core::amr::uploadCfCsr (const CfCsr &h, const char *name)
 
CfCompCsrDev peclet::core::amr::uploadCfCompCsr (const CfCompCsr &h, const char *name)
 
void peclet::core::amr::cfApply (const CfCsrDev &c, View< const double > f, View< double > out)
 out(i) += Σ coef·f(slot).
 
void peclet::core::amr::cfApplyComp (const CfCompCsrDev &c, View< const double > u0, View< const double > u1, View< const double > u2, View< double > out)
 out(i) += Σ coef·u[comp](slot).