core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
flow.hpp File Reference

Go to the source code of this file.

Classes

class  peclet::core::amr::AmrFlow< Bits >
 

Namespaces

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

Functions

template<int Dim, unsigned Bits, class FluidFn >
FaceGeom peclet::core::amr::buildFaceGeom (const AmrPoisson< Dim, Bits > &ap, FluidFn &&isFluid)
 Build FaceGeom from a built AmrPoisson (openness set) + a fluid predicate.
 
void peclet::core::amr::divergence (const FaceGeom &g, View< const double > u0, View< const double > u1, View< const double > u2, View< double > div)
 Openness-weighted FV divergence: div_i = invVol_i Σ_faces α·area·dir·½(u^axis_i+u^axis_j), on fluid cells (0 elsewhere).
 
void peclet::core::amr::buildFaceField (const FaceGeom &g, View< const double > u0, View< const double > u1, View< const double > u2, View< const double > phi, View< double > uf)
 Build the ABC/Basilisk divergence-free FACE field: uf(k) = ½(u^axis_i+u^axis_j) − (φ₊−φ₋)/dist for face k of cell i (+axis velocity), from u* (call after the pressure solve, before the cell gradient correction).
 
double peclet::core::amr::divFaceNorm (const FaceGeom &g, View< const double > uf)
 L2 norm of the divergence of the FACE field uf (the div-free flux diagnostic / host-parity check).
 
void peclet::core::amr::grad3 (const FaceGeom &g, View< const double > f, View< double > gx, View< double > gy, View< double > gz)
 ABC cell-gradient of a scalar field f: gx/gy/gz = ½(g⁻+g⁺) of the adjacent face gradients along each axis, a closed face (α≤1e-12) contributing nothing (and not counted).
 
void peclet::core::amr::momRhs (View< const double > uc, View< const double > gradP, View< const double > adv, View< const double > rscale, View< const char > fluid, double idiag, double fc, View< double > b, Index n)
 Momentum RHS for one component: b_i = fluid ? (idiag·u_i + f_c − gradP_i − adv_i)·rscale_i : 0 (== AmrCutCell::makeRhs of the oracle::AmrFlow predictor source, u_bc = 0).
 
void peclet::core::amr::buildFou (const FaceGeom &g, View< const double > u0, View< const double > u1, View< const double > u2, double rho, View< const double > rscale, View< double > advDiag, View< double > advCoef, View< const double > uf, bool useFace)
 Build the implicit-FOU advection operator from the lagged velocity u0..2 (uⁿ) entirely on device, as the per-cell outflow diagonal advDiag + per-face inflow coefficient advCoef over the face-geometry CSR (g.start/g.nbr).
 
void peclet::core::amr::deferredSou (const FaceGeom &g, View< const double > u0, View< const double > u1, View< const double > u2, int comp, double rho, int advScheme, View< double > defc, View< const double > uf, bool useFace)
 Deferred-correction advection term for component comp: defc = ρ·SOU − ρ·FOU (UNSCALED; the predictor RHS applies the cut-cell rscale once).
 
void peclet::core::amr::advectExplicit (const FaceGeom &g, View< const double > u0, View< const double > u1, View< const double > u2, int comp, double rho, int advScheme, View< double > defc, View< const double > uf, bool useFace)
 Fully-explicit high-order advection for component comp: defc = ρ·SOU (no implicit FOU; the setImplicitAdvection(false) fallback).
 
void peclet::core::amr::correct (View< double > uc, View< const double > gphi, View< const char > fluid, Index n)
 u_c -= gradPhi_c on fluid cells (the projection velocity correction).
 
void peclet::core::amr::presUpdate (View< double > p, View< const double > phi, View< const double > div, View< const char > fluid, double rho_dt, double mu, Index n)
 Rotational incremental pressure update: p += (ρ/dt)φ − μ·div, on fluid cells.