|
flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
flow — IbmSolver cut-cell scalar transport (doc/scalar_ibm_design.md): the geometry record of WO-2 — the lazy build ensureScalarCutGeometry (§2.5), its invalidation and the diagnostics getters — and the single-phase operator, solve and outputs of WO-3 (§1.4, §4, §5.1, §8). More...
Go to the source code of this file.
Classes | |
| struct | peclet::flow::scd::CutContext |
| The solver state the phases of one cut-cell solve read: the block, the operator's unknown and kappa masks, and the communicator with the solve's all-rank reductions. More... | |
| struct | peclet::flow::scd::KrylovContext |
| What the Krylov closures of one solve read beyond cx: the state, and the singular projection's solid unknown mask (two-field only) and unknown count. More... | |
| struct | peclet::flow::scd::FaceFluxCounts |
| What the face-flux pass counted: the faces carrying flux, those the guard zeroed, and the largest face speed of the projection. More... | |
Namespaces | |
| namespace | peclet |
| namespace | peclet::flow |
| namespace | peclet::flow::scd |
Functions | |
| void | peclet::flow::scd::ensureField (CCField &f, std::size_t n, const std::string &name, const char *tag) |
| (Re)allocate a per-scalar cell field when the block size changed. | |
| CutContext | peclet::flow::scd::cutContext (C3 e, int g, std::size_t n, const scg::ScalarCutGeometry &gm, bool distributed) |
| The context of one cut-cell solve on this rank's block; in MPI builds the caller sets comm. | |
| template<class Grid> | |
| FaceFluxCounts | peclet::flow::scd::faceFluxPass (Solver< Grid > &s, ScalarField &sc, bool steady, const bool openHere[6], const CCField openFlux[6], const CutContext &cx) |
| The face flux of the projection in force, guarded (sco::faceFluxes); the open (inflow/outflow) global faces this rank touches take the captured boundary-face flux openFlux[f], written over the guard's 0 (WO-5b, §6.5). | |
| template<class Units> | |
| void | peclet::flow::scd::advectionMaxima (const ScalarCutState &st, double vmax, double vcell, const CutContext &cx, const Units &u, double mx[4]) |
| The all-rank maxima of the face flux: max |phi|, the face speed, A2's census max_cell_peclet (max |phi_a| / (Lam' w_a) over interior faces) and the collocated CELL speed vcell. | |
| void | peclet::flow::scd::refuseUnadvectable (const std::string &name, const double mx[4], bool noFaceField, bool noProjection, bool noOpenFlux) |
| The moving fluids the cut-cell scalar cannot advect, refused rather than silently ignored: noFaceField (collocated, the projected face field never built), noProjection (no cut-cell pressure operator), noOpenFlux (an open face whose flux no projection has supplied yet). | |
| void | peclet::flow::scd::resetAdvectionCensus (ScalarCutState &st) |
| The advection census of the last advance, zeroed before it is counted. | |
| void | peclet::flow::scd::countGuardedOnly (ScalarCutState &st, long nGuard, const CutContext &cx) |
| No face carries flux: only the guarded faces are counted (all ranks). | |
| template<class Grid> | |
| void | peclet::flow::scd::classifySmallCells (Solver< Grid > &s, ScalarField &sc, const scg::ScalarCutGeometry &gm, double dt, const CutContext &cx) |
| §6.3, transient: C_bulk = the global MAX over full cells of dt Out / V, then the per-cell small-cell flags, their ghosts the owner's. | |
| void | peclet::flow::scd::countAdvection (ScalarField &sc, bool steady, const bool openHere[6], const FaceFluxCounts &fc, const CutContext &cx) |
| The advection census (all ranks): small cells, implicit faces, faces carrying flux, guarded faces and outflow-face backflow rows; it also marks the open-face rows built. | |
| template<class Grid> | |
| void | peclet::flow::scd::warnBackflow (const Solver< Grid > &s, ScalarField &sc, bool steady) |
| Review finding 2a (ruling D-WOR-2a): A2 requires an implicit backflow row to be reported. | |
| void | peclet::flow::scd::allocateWork (ScalarField &sc, std::size_t n, long numFacets) |
| The surrogate diagonal, the Krylov scratch and the per-facet coefficients, sized to the block. | |
| template<class Units> | |
| void | peclet::flow::scd::operatorScalars (ScalarCutState &st, bool steady, double dt, double D, const Units &u, long numUnknowns) |
| The operator's internal coefficients from the stored physical values (§1.2, at advance time) and the mean-gradient mode (§1.5). | |
| template<class Units> | |
| sco::WallTable | peclet::flow::scd::wallTable (ScalarCutState &st, int nb, const Units &u) |
| The per-body wall table, resolved and converted (§4.2), and its persistent device copy. | |
| void | peclet::flow::scd::rightHandSide (ScalarField &sc, const scg::ScalarCutGeometry &gm, const CutContext &cx) |
| The right-hand side: kappa (idt c^n + S') + the walls' rw. | |
| template<class Units> | |
| Kokkos::View< double *, CCMem > | peclet::flow::scd::dirichletFaceValues (ScalarField &sc, int f, const int n[3], C3 origin, const Units &u) |
| The Dirichlet value per face cell of domain face f (§1.4), in the persistent gFace[f]: the profile or the uniform value, in mean-gradient mode theta_bf = g - G.x_bf (§1.5). | |
| template<class Grid, class Units> | |
| void | peclet::flow::scd::advectionOperator (Solver< Grid > &s, ScalarField &sc, bool steady, const CutContext &cx, const Units &u) |
| The advection operator (WO-5, §6) once some face carries flux: the implicit FOU bands (their outflow lumps into the surrogate diagonal through AC), the explicit faces' net outflow at c^n on the rhs, the open domain faces' rows and the mean-gradient source. | |
| template<class Units> | |
| void | peclet::flow::scd::conjugateOperator (ScalarField &sc, const scg::ScalarCutGeometry &gm, const sco::MaterialTable &mt, const sco::MeanGradPosition &mgPos, const CutContext &cx, const Units &u) |
| WO-7: the solid phase's operator (§1.4 solid row, §4.1): psi_s^n, the face products, the mass C_s K kappa_s idt, the 7 bands, the rhs; the per-facet interface coupling cc; the mean-gradient terms of §1.5 on the solid faces and the conjugate facets; the two-field level-0 surrogate. | |
| bool | peclet::flow::scd::singularSolve (const ScalarCutState &st, bool steady, bool anyDir, const int bc[6], const CutContext &cx) |
| The singular case (§5.1): steady, no facet with G > 0, no Dirichlet domain face anywhere. | |
| template<class Units> | |
| ScalarMG::Inputs | peclet::flow::scd::mgInputs (ScalarField &sc, const scg::ScalarCutGeometry &gm, bool steady, const CutContext &cx, const Units &u) |
| Everything ScalarMG's build reads from this operator (§5.2; ruling D-WO3-3). | |
| template<class Grid> | |
| void | peclet::flow::scd::warnShallowBottom (const Solver< Grid > &s, ScalarField &sc, bool fullTable) |
| Review finding 4 (ruling D-WOR-4): the full table's bottom is a fixed number of smoothing sweeps on whatever level the table stops at – there is no agglomerated exact coarse solve (CutcellMG's 'auto' bottom). | |
| void | peclet::flow::scd::removeMean (const CutContext &cx, CCField a, double nUnk) |
| Subtract the unknowns' mean from a fluid field (the singular projection, §5.1). | |
| void | peclet::flow::scd::removeMeanTwo (const CutContext &cx, CCField a, CCField as, const CCConst &sunk, double nTot) |
| The same over both phases' unknowns (the null vector is constant in psi). | |
| CCField | peclet::flow::scd::projectedRhs (ScalarField &sc, const CutContext &cx) |
| The right-hand side the single-field Krylov sees: b, or (singular) its projection onto the range, with the incompatibility |sum b| / sum |b| recorded. | |
| template<class Grid> | |
| ScalarKrylovOps | peclet::flow::scd::singleFieldOps (Solver< Grid > &s, ScalarField &sc, const KrylovContext &k) |
| The single-field Krylov operations: the operator, one ScalarMG V-cycle on the surrogate (§5.2; level 0 alone under the transient level rule), the all-rank dots and maxima; single rank, the device-resident pass (WO-9b, scalar_krylov.hpp). | |
| ScalarVec | peclet::flow::scd::fieldVec (CCField f) |
| ScalarVec | peclet::flow::scd::fieldVecTwo (CCField f, CCField s2) |
| void | peclet::flow::scd::remeasureAfterGauge (ScalarKrylovResult &kr, const ScalarKrylovOps &ops, const ScalarVec &t, const ScalarVec &x, const ScalarVec &b, const ScalarCutState &st, const CutContext &cx) |
| Review finding 5 (ruling D-WOR-5): the gauge shift delta adds delta A 1 = delta div to the residual, so the reported residual and flag are re-measured after it – the Krylov's own true-residual definition (the projected rhs, mean removed), its reference and its 10 rtol. | |
| template<class Grid> | |
| ScalarKrylovResult | peclet::flow::scd::solveSingle (Solver< Grid > &s, ScalarField &sc, const CutContext &cx) |
| The single-field solve: BiCGStab on c, and for the singular case the gauge sum kappa V c kept at its pre-solve value (§5.1; 0 in mean-gradient mode). | |
| void | peclet::flow::scd::projectedRhsTwo (ScalarField &sc, const CutContext &cx, CCField &bKf, CCField &bKs) |
| The two-field right-hand side {b, b_s}, or (singular) its projection over both phases. | |
| void | peclet::flow::scd::twoFieldMoments (ScalarField &sc, const sco::MaterialTable &mt, const CutContext &cx, double m[2]) |
| gauge (§5.1): sum kappa V c + sum C_s K kappa_s V psi_s over both phases, all ranks. | |
| template<class Grid> | |
| ScalarKrylovOps | peclet::flow::scd::twoFieldOps (Solver< Grid > &s, ScalarField &sc, const KrylovContext &k) |
| The two-field Krylov operations: ScalarVec {c, psi_s}; dots and maxima over both fields; the singular projection over both phases' unknowns (k.sunk, k.nUnk = both phases' count). | |
| template<class Grid> | |
| ScalarKrylovResult | peclet::flow::scd::solveTwo (Solver< Grid > &s, ScalarField &sc, const sco::MaterialTable &mt, const CutContext &cx) |
| WO-7: the two-field solve (§5.1 on both phases): the same BiCGStab on {c, psi_s}, the gauge weights kappa and C_s K kappa_s. | |
| void | peclet::flow::scd::recordSolve (ScalarField &sc, const ScalarKrylovResult &kr, const CutContext &cx) |
| The solve's statistics and the once-per-scalar non-convergence warning (rank 0). | |
flow — IbmSolver cut-cell scalar transport (doc/scalar_ibm_design.md): the geometry record of WO-2 — the lazy build ensureScalarCutGeometry (§2.5), its invalidation and the diagnostics getters — and the single-phase operator, solve and outputs of WO-3 (§1.4, §4, §5.1, §8).
The block kernels are scalar_cutcell_geometry.hpp and scalar_cutcell_operator.hpp, the Krylov driver scalar_krylov.hpp; the per-cell geometry and the probe ladder are core's peclet::core::scheme (WO-1).
Out-of-line member definitions of peclet::flow::Solver (QUALITY_PLAN G.1 domain split). Declarations, docstrings and the class state live in flow_ibm.hpp, which includes this file at the bottom; this file is never included on its own.
Definition in file flow_ibm_scalars_cutcell.hpp.