flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
BoundSolver< Grid > Struct Template Referencefinal
Inheritance diagram for BoundSolver< Grid >:
peclet::flow::Solver< Grid >

Public Member Functions

void release () noexcept override
 
- Public Member Functions inherited from peclet::flow::Solver< Grid >
 Solver (int nx, int ny, int nz)
 
SceneMap sceneMap () const
 
 Solver (int nx, int ny, int nz, const std::array< double, 3 > &extent, const std::array< double, 3 > &origin, const std::array< long, 3 > &globalCells)
 Physical-domain constructor (plan §3.3).
 
void setPhysicalDomain (const std::array< double, 3 > &extent, const std::array< double, 3 > &origin, const std::array< long, 3 > &globalCells)
 Arm the physical domain.
 
void requireIsotropic (const char *what) const
 Phase 2 §7 — refuse an ANISOTROPIC domain in a consumer this phase does not carry.
 
bool hasPhysicalDomain () const
 
const UnitScales & unitScales () const
 
std::array< double, 3 > spacing () const
 Cell size per axis (equal on every axis unless the Phase 2 anisotropic path is armed – see unitScales().aniso).
 
std::array< double, 3 > domainOrigin () const
 Physical lower corner of the GLOBAL inner grid.
 
std::array< double, 3 > domainExtent () const
 Physical extent of the GLOBAL inner grid (cell counts without a physical domain).
 
std::array< long, 3 > globalCells () const
 The GLOBAL cell counts (this rank's block single-rank).
 
std::vector< double > cellCentres (int axis) const
 Physical cell-centre coordinates of THIS rank's inner block along axis (nx/ny/nz values).
 
void refreshUnitDerived ()
 Re-derive every internal (index-unit) quantity from the stored physical inputs.
 
void pushVofMetric ()
 Hand the anisotropic cell metric to every VoF driver that exists (Phase 3).
 
void allocateBlock (int nx, int ny, int nz)
 
void setRho (double r)
 Fluid density, in the caller's units.
 
void setMu (double m)
 Dynamic viscosity, in the caller's units.
 
void setDt (double d)
 
void setBodyForce (double fx, double fy, double fz)
 Body force per unit volume, in the caller's units (e.g. a mean pressure gradient, or rho*g).
 
void setSuperficialVelocity (bool on, int axis, double velocity)
 Hold the SUPERFICIAL velocity along a periodic axis: at the end of every step() one uniform shift is added to every inner face velocity of component axis so that its volume mean equals velocity (the caller's units).
 
double lastSuperficialVelocityShift () const
 The shift the last step() applied (caller's velocity units; 0 when off).
 
void setVelocityIterations (int it)
 
void setVelocityTolerance (double rtol, int minIters)
 
long lastMomentumSweeps () const
 
void setVelocityResidualTolerance (double rtol)
 
void setVelocityMultigridAuto (long cellsPerRank, long minGlobalCells=-1, int minBlockExtent=-1)
 
void setVelocityChebyshev (bool on, int maxit=400)
 
void setVelocitySolverAuto ()
 
bool velocityChebyshevActive () const
 
void setVelocityMgChebyshev (bool on, int degree=0, double eig_ratio=10.0)
 
bool velocityMgChebyshev () const
 
double velocityResidualTolerance () const
 
double lastMomentumResidual () const
 
void setPressureMeanRemoval (bool all)
 
void setPressureIterations (int it)
 
void setAdvection (bool on)
 
void setAdvectionScheme (int s)
 
void setImplicitAdvection (bool on)
 
void setOuterIterations (int iters)
 
void setOuterTolerance (double tol)
 
long lastOuterIterations () const
 
void setVelocityMultigrid (bool on, int levels, int vcycles)
 
void throwVelocityMgVariableMu (const char *who) const
 
bool velocityMultigridActive () const
 
void setPressureBottomMode (int mode)
 
void setPressureBottomSolver (int engine)
 
void setPressureTelescope (bool on)
 
bool pressureTelescope () const
 
void setPressureTelescopeForceLevel (int level)
 
int pressureTelescopeCount () const
 
void setPressureGraphAmg (bool on)
 
void setPressureLevels (int levels)
 
void setBackflowStab (double beta)
 
void setDeferredCorrection (bool on)
 
void setPressureChebyshev (bool on, int maxit, double rtol)
 
void setPressurePcg (bool on, int maxit, double rtol)
 
void setPressureFcg (bool on, int maxit, double rtol)
 
void setGhostProjection (bool on, int matrixOrder=2, int rhsOrder=2)
 
void setExactCrossings (const std::vector< double > &t)
 
void setOpennessOverride (const std::vector< double > &ox, const std::vector< double > &oy, const std::vector< double > &oz)
 
void setIncrementalPressure (bool on)
 
void setBalancedForceProjection (bool enabled)
 
bool balancedForceProjection () const
 
long lastBalancedForceIterations () const
 
bool lastBalancedForceFailed () const
 
long balancedForceFailures () const
 
void setPressureWarmstart (bool on)
 
void setFaceInterp (int mode)
 
int faceInterp () const
 
void setCollocatedScheme (const std::string &name)
 
void setRotationalPressure (bool on)
 
void setRotationalWeight (double w)
 
void setRotationalWallWeight (double w0)
 
void setApertureOrder (int order)
 
int apertureOrder () const
 
void setAdvectionWallVelocity (bool on)
 A0 — wall velocity (not zeros) in the advection inputs' masked rows. DEFAULT true.
 
bool advectionWallVelocity () const
 
void setUfAdvection (bool on)
 Advect the collocated momentum with the PROJECTED, divergence-free MAC face field uf_/vf_/wf_ (DEFAULT true) rather than the un-projected cell->face average 1/2(u_i+u_j).
 
bool ufAdvection () const
 
void setCommAvoiding (int mask)
 Communication-avoiding red-black smoothing: kCaMomentum | kCaMg.
 
int commAvoiding () const
 
void setMultigridAspectThreshold (double theta)
 The anisotropic-coarsening aspect threshold theta shared by the pressure and velocity multigrids (doc/anisotropic_metric.md §5.1).
 
double multigridAspectThreshold () const
 
void setPressureStrict (bool on)
 Throw instead of reporting when the pressure preconditioner returns a non-finite correction (ISSUES sweep item 6).
 
bool pressureStrict () const
 
void setPressureCoarseGhost (bool on)
 Neumann (zero-gradient) coarse ghost on wall/inflow faces before the pressure MG's prolongation — the WO-H symmetry repair.
 
bool pressureCoarseGhost () const
 
void setPressureBottomExtent (int cells)
 The set_pressure_bottom("auto") criterion: agglomerate once the coarsest GLOBAL grid exceeds this many cells on any axis.
 
int pressureBottomExtent () const
 
void setDecomposition (int levels, double maxImbalance=1.05)
 How the shared level-0 MPI decomposition is built.
 
int decompositionLevels () const
 
double decompositionMaxImbalance () const
 
void setFluidOnlyConstraint (int mode)
 
void setRotationalFilter (bool on, double eps=0.05)
 
void seedFaceFieldFromCells ()
 
void uploadVelocity (const std::vector< double > &uu, const std::vector< double > &vv, const std::vector< double > &ww)
 Upload an initial velocity field in the caller's PHYSICAL units (converted per component to the index velocity the kernels carry; the conversion is the identity in cell units).
 
void setDomainBc (int face, int type, double vx, double vy, double vz)
 
void setDomainBcProfile (int face, const std::vector< double > &prof, int nb, int nc)
 
void resampleBcProfile (int face)
 
void setPressureGeometry (const std::vector< double > &sdfInner)
 
void setScene (const std::vector< int > &nodeInts, const std::vector< double > &nodeReals, const std::vector< int > &instInts, const std::vector< double > &instReals, bool periodic=false)
 Install an analytic scene from core's flat node/instance encoding (peclet/core/geom/scene_builder.hpp: 3 ints + 16 reals per node, 2 ints + 17 reals per instance), held as a core SceneQueryDevice: mode selection (sphere-union fast path vs general tree walk), candidate-grid acceleration and min-image periodicity all live in CORE now — flow briefly hand-rolled the decode+upload+eval, which was the wrong layer for it.
 
std::array< double, 3 > instanceCenter (int i) const
 The resolved centre of rotation of instance i and whether it is pinned (explicit) or follows the body's translation.
 
bool instanceCenterPinned (int i) const
 
void setInstanceMotion (int i, const std::array< double, 3 > &lin, const std::array< double, 3 > &ang, const double *center=nullptr)
 Rigid-body motion of one scene instance (Layer 3 rung 2).
 
void setInstanceTransform (int i, const std::array< double, 3 > &translation, const std::array< double, 4 > &quat)
 Move one instance (Layer 3 rung 4).
 
void rebuildGeometry ()
 Re-derive ALL geometry from the current instance transforms (Layer 3 rung 4): rebuild the accelerated scene query, re-sample the SDF, rebuild the cut-cell overlay / apertures / pressure operator, and re-derive the exact crossings if they were in use.
 
void seedFreshCells (CCField mOld[3])
 FRESH CELLS: the points a moving body has just uncovered.
 
void setFreshCellSeed (bool on)
 Fresh-cell policy for moving geometry.
 
bool freshCellSeed () const
 
void refreshWallVelocity ()
 Re-derive ONLY the wall-velocity fields and the momentum operator that folds them in.
 
bool hasMovingInstance () const
 True when at least one instance carries a nonzero velocity – i.e.
 
int sceneInstanceCount () const
 
void setWallFluxDivergence (bool on)
 Rung 3 on/off.
 
bool wallFluxDivergence () const
 
bool hasScene () const
 
std::vector< int > getCutOwner () const
 Per-inner-cell owning instance (Layer 3 rung 1), x-fastest, -1 where no scene has been sampled yet.
 
void setSolidFromScene (bool cutcellPressure)
 Sample the scene onto this rank's inner grid and install it as the solid, entirely on device – no nx*ny*nz float64 host round trip, and correct on every rank.
 
void checkMovingInstancesAreCut ()
 A MOVING instance whose surface produces no fractional face aperture has no path for its wall velocity into the momentum operator: the no-slip datum enters ONLY through the cut-cell fold, so a box face sitting exactly on a grid plane (or a body smaller than a cell) behaves as a STATIONARY wall and set_instance_motion is silently inert – the shear-driving plates of the Jeffery-orbit page at y = 16.0 produced max|u| = 0 (peclet-examples ISSUES.md).
 
std::vector< long > movingInstanceCutCells () const
 Per instance: cut rows of the momentum operator (all three components) at inner points this rank owns for it, recounted by set_solid_from_scene / rebuild_geometry when any instance moves (global under MPI; empty when nothing moves).
 
std::vector< long > movingInstanceDegeneratePoints () const
 Per instance: staggered points where the sampled sdf is exactly zero (see the warning).
 
long periodicImageOverlapCells () const
 Cells on this rank whose solid/fluid sign was set by a periodic IMAGE of an instance wider than the box (see setSolidFromScene); 0 when no instance is that wide or the images agree.
 
void setExactCrossingsFromScene ()
 EXACT wall crossings straight from the scene, on device, on every rank – the in-solver replacement for set_exact_crossings + scripts/exact_apertures_spheres.py.
 
void setSolid (const std::vector< double > &sdfInner, bool cutcellPressure)
 Host entry point: upload the inner SDF once and delegate.
 
void buildVelocityOverlays (bool resetU)
 Build the three per-component Robust-Scaled cut-cell overlays + solid masks from the CURRENT sdf_ (extracted verbatim from setSolidDevice so that a wall-slip change can rebuild the closure without re-running the whole geometry setup).
 
void extendSdfDomainGhosts (CCField f)
 Repair a cell-centred geometry field's ghost band on every rank-owned NON-PERIODIC domain face, which the periodic/halo fill filled from the opposite side of the domain: type 4 (free-slip) takes the mirror the symmetry plane asserts, types 1/2/3 (wall / inflow / outflow) the constant normal extension.
 
void setSolidDevice (CCField din, bool cutcellPressure)
 Device entry point (Layer 2): the inner SDF is ALREADY on device, so geometry never round-trips through the host.
 
void setSolidSelectScheme ()
 
void setSolidUploadSdf (CCField din)
 
void setSolidBuildOverlaysAndStencils ()
 
void setSolidVelocityMgAuto ()
 
void initVelocityMg ()
 
void setSolidBuildOpenness ()
 
void checkSealedInflowCells ()
 Reject geometry that seals fluid cells against a prescribed INFLOW face off from the rest of the domain – an inconsistent pressure row that no solve can satisfy.
 
void bridgeOutflowFacePlanes ()
 Bridge the HIGH-side boundary-face openness plane of every rank-owned outflow axis from the g=2 block to the g=1 MG block (copyInner reaches only the inner cells, and that plane is a ghost index).
 
void setSolidStarOverlay ()
 
void setSolidGhostProjectionOverlay (CCField din)
 
void setSolidInitPressureMg ()
 
bool geometryBuilt () const
 
void requireNoGeometry (const char *who) const
 
void step ()
 
OutflowBackflow outflowBackflow ()
 
std::vector< double > getVelocity (int c)
 
void setVelocity (int c, const std::vector< double > &v)
 Write a component's inner velocity from a host vector (x-fastest, inner region) and re-impose the solid mask.
 
std::vector< double > getFaceVelocity (int c)
 
std::vector< double > getOpenness (int c)
 
std::vector< double > getMomentumDiagonal (int c)
 
std::vector< double > getOpennessProj (int c)
 
std::vector< double > getPressure ()
 
double maxOpenDivergenceProjected ()
 
double maxOpenDivergenceProjectedInternal ()
 The same diagnostic in INDEX units (per tRef), which is what the solver's own guards read.
 
double maxOpenDivergence ()
 
double maxOpenDivergenceInternal ()
 The same diagnostic in INDEX units (per tRef), which is what the solver's own guards read.
 
double maxPorousResidual ()
 
long lastPressureIterations () const
 
long numPressureChebyshevRestarts () const
 
std::vector< std::array< int, 3 > > pressureMgLevelRatios () const
 
bool pressureSolveFailed () const
 
MarchState marchState ()
 
double lastStepSeconds () const
 
double lastPredictorSeconds () const
 
double lastMomentumSeconds () const
 
double lastProjectionSeconds () const
 
void setVofTiming (bool on)
 
bool vofTiming () const
 
void resetVofTiming ()
 
const VofTiming & vofTimingReport () const
 
const vof::WyAdvector::Timing & vofKernelTiming () const
 
const vof::VofCurvature::Timing & vofCurvatureTiming () const
 
void setVofCurvatureWorklist (bool on)
 VofCurvature::useWorklist — run the height-function cascade and the PV fallback over a COMPACTED list of the interfacial cells instead of over the whole inner region.
 
bool vofCurvatureWorklist () const
 
double vofTimingStepSeconds () const
 
double vofTimingPredictorSeconds () const
 
double vofTimingMomentumSeconds () const
 
double vofTimingProjectionSeconds () const
 
void setVofWorklist (bool on)
 WyAdvector::useWorklist — the compaction of the PLIC reconstruction pass onto the mixed cells.
 
bool vofWorklist () const
 
double lastPressureAllreduceSeconds () const
 
long lastPressureAllreduceCount () const
 
int nx () const
 
int ny () const
 
int nz () const
 
bool implicitAdv () const
 
bool bcStencilPath () const
 
bool mixedVelocityMg () const
 
void fillPropGhosts (CCField f, bool edges=false)
 
void fillMuGhosts ()
 
void fillCellForceGhosts ()
 
void fillDragBetaGhosts ()
 
void fillPorousEpsGhosts ()
 
void buildVofBlock ()
 
int vofWetWallMask () const
 
void buildVofGeometry ()
 
void applyDomainWallGeometry (int mask)
 
void imposeDomainWallKind (int mask)
 
void vofExtendWallBand (CCField f, int mask)
 
void zeroSolidColour ()
 
bool vofAxisPeriodic (int a) const
 
void vofFillGhosts (CCField f)
 
void vofExchangeRaw (CCField f)
 
I3 vofGlobalSize () const
 
I3 vofOrigin () const
 
void bridgeVelocityToVof ()
 
std::vector< vof::VofBox > vofBlockRankBoxes (int size) const
 
void bindVofBlockPatch ()
 
void harvestVofBlockUnion ()
 
void bridgeColourToVof ()
 
long strideOf (int c) const
 
bool effVarRho () const
 
CCField effRhoField ()
 
bool colocatedFaceForce () const
 
void collocatedV8AutoFallback (const char *why)
 
void ensureFaceAcc ()
 
void requireCollocatedFaceForceScope (const char *who)
 
bool balancedForceActive () const
 
bool hasOpenDomainFace () const
 
void requireBalancedForceScope (const char *who, bool atStep) const
 
void buildBalancedFaceForce (int c)
 
void registerBalancedForceState ()
 
void applyBalancedForceProjection ()
 
long solveBalancedForceSystem (double bref, double r0)
 
void updateEpsRho ()
 
VarFaceProps makeFaceProps (int c)
 
void buildSceneQuery ()
 
void refreshMotionFlag ()
 
void uploadMotion ()
 
peclet::core::geom::InstanceMotionView< double > motionView () const
 
void buildWallVelocity ()
 
void exchangeExtRaw (CCField f)
 Raw ghost fill of an extended-block field: the rank halo exchange under MPI, the periodic wrap single-rank.
 
void addWallFluxDivergence (CCField d)
 
void scaleForceTorque (std::vector< double > &out, std::size_t m) const
 Hydrodynamic force and torque on each scene instance (Layer 4 rung 2) – the resolved CFD-DEM feedback.
 
std::vector< double > hydroForceTorque ()
 PHASE 2 (anisotropic cells), doc/anisotropic_metric.md §4.4 — ADMITTED since commit C4.
 
std::vector< double > hydroForceTorqueReaction ()
 Hydrodynamic force and torque per instance from the DISCRETE REACTION (route (b) of the design note's OPEN FOR REVIEW 1) – the recommended source of the resolved CFD-DEM feedback.
 
std::array< long, 3 > fluidMomentumCells ()
 The number of unmasked (fluid) staggered momentum cells per component – the exact discrete datum the reaction identity is stated against: at steady state, sum_bodies F_c = f_c * N_c.
 
std::vector< double > reactionBudgetTerms ()
 R0 DECOMPOSITION PROBE.
 
std::array< double, 3 > wallAreaProbe ()
 A_wall EXACTNESS PROBE (diagnostic for the Layer-4 force integral).
 
double wallFluxImbalance ()
 Net wall flux this rank injects, sum over inner cells of u_w .
 
CCConst wallVelView (int c) const
 
void rebuildStencils ()
 
void copyInner (CCField dst, C3 de, int dg, CCConst src, C3 se, int sg)
 
void copyBlockShifted (CCField dst, C3 de, CCConst src, C3 se, int off)
 
void fillGhosts (CCField f)
 
void fillGhostsFaces (CCField f)
 
void fillAxis (CCField f, int axis)
 
void fillPeriodicAxes (CCField f, int axes)
 
void fillDomainPeriodic (CCField f)
 
void computeDivAdv ()
 
bool advWallInputs () const
 R0 helper: allocate (once) and arm the per-component advective-term stash the reaction-force budget consumes.
 
void buildAdvInputs ()
 
CCConst advVelView (int c) const
 The velocity view the advection operators must read for component c: the wall-corrected scratch while an instance is moving, the live field (byte-identical) otherwise.
 
CCConst advFaceView (int c) const
 Component c of the collocated MAC face field (uf_/vf_/wf_), flow's low-face convention: entry i is the velocity at the -axis face of cell i.
 
CCConst openFaceView (int c) const
 Component c of the face field AS THE ADVECTION AND THE DIVERGENCE DIAGNOSTIC MUST READ IT: advFaceView(c) everywhere except an OPEN (outflow) domain face, where the zero-gradient extrapolation of the interior face replaces the projection's mass-balance closure (buildOpenFaceField).
 
void buildOpenFaceField ()
 Build ufOpen_ = the face field with each open (outflow) domain face overwritten by its zero-gradient extrapolation.
 
bool ufAdvVelocity () const
 Are the advection operators reading the projected face field this step? Collocated grid, setUfAdvection on, and a face field actually built.
 
bool ensureAdvStash (int c, bool adv)
 
void buildRhs (int c)
 
void buildRhsForced (int c)
 
void buildRhsVar (int c)
 
void buildRhsVarMom (int c)
 
void buildRhsColoVar (int c)
 
void addCsfRhs (int c, CCField dst, bool rowScaled, bool faceRange=false)
 
void addCsfRhsCellInterp (int c, CCField dst, bool rowScaled, bool faceRange=false)
 
void addCsfRhsBlocks (int c)
 
CsfDiagnostics csfDiagnostics ()
 
void buildAdvStencil (int c)
 
void buildAdvStencilVar (int c)
 
void applyBackflowStab (int c)
 
double maxAbsDiffInner (CCConst a, CCConst b)
 
template<class Fill , class Color , class ColorDu >
void velSweepLoop (Fill &&fill, Color &&sweepColor, ColorDu &&sweepColorDu, std::function< double()> resid=nullptr, double bnorm=0.0)
 
VelocityMG::Comm vmgComm () const
 
double finishResidual (int c)
 
std::function< double()> stencilResidual (int c, bool exchange=false)
 
std::function< double()> constCoeffResidual (int c, double bx, double by, double bz, double Ac)
 
double stencilBnorm (int c)
 
void smoothComp (int c)
 
void chebSolveComp (int c)
 
void pressureBcGhost ()
 
void fillVelGhosts (int comp, int fold)
 
void applyVelocityBcComp (int comp, int fold, bool doOutflow)
 
void fillVelGhostsTo (CCField f, int comp, int fold, bool doOutflow=true)
 
void applyVelocityBcCompTo (CCField f, int comp, int fold, bool doOutflow)
 
void applyVelocityBcFace (CCField f, int comp, int a, int s, int fold, bool doOutflow)
 
bool bcVelFacePair (int a) const
 
void applyVelocityBcAll (int fold, bool doOutflow)
 
void setupBcDiffusion ()
 
void filterCellField (CCField f, int axis)
 
void project ()
 
void projectAssembleDivergence ()
 
void projectBuildCoefficients ()
 
void projectSolve ()
 
long solvePressureSystem (CCField rhs1, CCField x1)
 
void constraintDivergence (CCConst fx, CCConst fy, CCConst fz, CCField out)
 
void projectCorrectVelocities ()
 
void projectPressureUpdate ()
 
void maskVelocity (int c)
 
double minMuInner ()
 
double reduceMaxAbsInner (CCConst f)
 
std::vector< double > gatherInner (CCField fld)
 
void scatterInner (CCField fld, const std::vector< double > &in)
 
CCField addField (const std::string &name)
 
bool hasField (const std::string &name) const
 
CCField fieldView (const std::string &name)
 
std::vector< std::string > fieldNames () const
 
void exchangeField (const std::string &name)
 
void exchangeFieldAdd (const std::string &name)
 
std::vector< double > getField (const std::string &name)
 
void setField (const std::string &name, const std::vector< double > &v)
 
std::array< int, 3 > blockShape () const
 
int ghostWidth () const
 
std::array< int, 3 > globalResolution () const
 
std::array< int, 3 > blockOrigin () const
 
void addScalar (const std::string &name, double D, int scheme, int iters, bool cutcell=false)
 
bool hasScalar (const std::string &name) const
 
void setScalarBc (const std::string &name, int face, int type, double value)
 
void advanceScalars ()
 
void invalidateScalarCutGeometry ()
 
void ensureScalarCutGeometry ()
 
const scg::ScalarCutGeometry & scalarCutGeometry ()
 
std::vector< double > scalarGeometryField (int which)
 
scg::ScalarCutCensus scalarCutCensus ()
 
bool isCutcellScalar (const std::string &name) const
 
void setScalarWall (const std::string &name, int type, double value, double coefficient, int instance)
 
void setScalarSolid (const std::string &name, double D, double capacity, double partition, double contactResistance, int instance)
 
std::vector< double > getScalarSolid (const std::string &name)
 
std::vector< double > scalarSolidGeometryField (const std::string &name, int which)
 
void setScalarSource (const std::string &name, double S)
 
void setScalarSourceField (const std::string &name, const std::vector< double > &S)
 
void setScalarTolerance (const std::string &name, double rtol)
 
void setScalarMaxIterations (const std::string &name, int maxit)
 
void setScalarMeanGradient (const std::string &name, const std::array< double, 3 > &G)
 
std::array< double, 3 > scalarMeanFlux (const std::string &name)
 
sco::MeanGradPosition scalarMeanGradPosition (const double Gphys[3]) const
 
void setScalarBcProfile (const std::string &name, int face, const std::vector< double > &prof, int n1, int n2)
 
void solveScalarSteady (const std::string &name)
 
int scalarNumBodies () const
 
std::vector< double > scalarWallFlux (const std::string &name)
 
ScalarCutBudget scalarBudget (const std::string &name)
 
ScalarCutFacets scalarFacets (const std::string &name)
 
ScalarField & cutcellScalar (const std::string &name, const char *who)
 
void advanceScalarCutCell (ScalarField &sc)
 
void scalarCutRefusals (const ScalarField &sc) const
 
void scalarCutAssembleSolve (ScalarField &sc, bool steady)
 
void scalarCutWarnings (ScalarField &sc)
 
bool scalarRootRank () const
 rank 0 (or not distributed): the one that prints a warning
 
void scalarCutMatvec (ScalarField &sc, CCField y, CCField x)
 
void scalarCutMatvecTwo (ScalarField &sc, CCField yf, CCField ys, CCField xf, CCField xs)
 
void ensureScalarSolidRecord (ScalarField &sc, const std::vector< char > &conj)
 
sco::MaterialTable scalarMaterialTable (ScalarField &sc, std::vector< char > &conj)
 
ScalarFaceFlux scalarFaceFlux (int a) const
 
void scalarCaptureOpenFaceFlux ()
 
void scalarCutAdvection (ScalarField &sc, bool steady)
 
void applySuperficialVelocity ()
 
void superficialVelocityPrecheck () const
 
void enableVof ()
 
void setVofWispEps (double eps)
 WO-R2 item 4 — the wisp threshold on the advector's mixed-cell predicate and on the interface Courant band.
 
double vofWispEps () const
 
bool vofEnabled () const
 
void setVof (const std::vector< double > &c)
 
std::vector< double > getVof ()
 
vof::WyAdvector::Diagnostics vofDiagnostics ()
 
double vofSolidColourSum ()
 
double vofMaxCourant ()
 
double vofLastCourant () const
 
void setVofCflLimit (double v)
 
double vofCflLimit () const
 
void requireVofGeometry (const char *who)
 
bool vofHasGeometry () const
 
void setVofCutFluxClamp (bool on)
 
bool vofCutFluxClamp () const
 
void setVofSolidColourZero (bool on)
 
bool vofSolidColourZero () const
 
std::vector< double > getVofFilledColour ()
 
std::vector< double > getVofGeometry (int which)
 
void setContactAngle (double thetaDeg)
 
void requireWettingWall () const
 
void setContactAngleField (const std::vector< double > &thetaDeg)
 
bool contactAngleSet () const
 
double contactAngle () const
 
void setContactAnglePivot (int mode)
 
int contactAnglePivot () const
 
void setContactAngleDynamic (double thetaEDeg, double slipCells, double muLiquid, double sigma=0.0)
 
void setWallSlipLength (double lambdaCells)
 WO-V6b – the VELOCITY half of the dynamic contact line.
 
double wallSlipLength () const
 The Navier slip length in the caller's units (0 = no-slip).
 
std::array< int, 3 > wallSlipSandwichCells () const
 Cut-cell axes at which a one-cell fluid gap kept the no-slip closure (per component).
 
void setContactAngleHysteresis (double thetaADeg, double thetaRDeg)
 
void setContactAngleDynamicOff ()
 
bool contactAngleDynamic () const
 
bool contactAngleHysteresis () const
 
double contactAngleSlip () const
 
void setContactAngleSmoothing (bool on)
 
void setContactAngleClamp (double loDeg, double hiDeg)
 
double effectiveContactSigma () const
 
std::vector< double > getVofDynamicField (int which)
 
ContactAngleDiagnostics contactAngleDiagnostics ()
 
void applyContactAngle ()
 
void buildVofCellVelocity ()
 
const vof::WyAdvector & vofAdvector () const
 
void setVofStepParity (long n)
 
long vofStepParity () const
 
void advectVofKinematic (double dtPhysArg)
 dt is in the caller's time unit.
 
void enableVofBlocks (const std::vector< std::array< double, 4 > > &seeds)
 
void prepareVofBlocks ()
 
void finishVofBlocks ()
 
bool vofBlocksEnabled () const
 
void disableVofBlocks ()
 
void advectVofBlocks (double dtPhysArg, bool requireSolenoidal=true)
 dt is in the caller's time unit.
 
std::vector< vof::VofBlockStats > vofBlockStats () const
 
double vofBlockImbalance () const
 
void vofBlockCensus (std::vector< long > &masters, std::vector< long > &cells) const
 
void setVofBlockAssign (int mode, long every)
 
int vofBlockAssign () const
 
double vofBlockImbalanceOf (int mode) const
 
void setVofBlockDeviceStaging (bool on)
 
void setVofBlockPool (bool on)
 
std::array< long, 2 > vofBlockPoolStats () const
 
void enableVofBlocksFromField (const std::vector< std::array< int, 6 > > &boxes)
 
std::vector< double > vofBlockColour (long id)
 
std::vector< double > vofBlockKappa (long id)
 
const vof::VofBlockSet * vofBlockSet () const
 The block container itself, read-only (tests: the metric and tunables its cascades carry).
 
void enableVofBlocksFromColours (const std::vector< std::array< int, 6 > > &boxes, const std::vector< std::vector< double > > &colours)
 
void enableVofBlockCsf ()
 
void computeVofBlockCsf ()
 
VofOverlapCensus vofBlockOverlapCensus () const
 
void updateVofBlockOverlap ()
 
void setVofBlockOverlapDensity (bool enabled)
 
void setVofBlockDebris (bool enabled)
 
void setVofPhantomCapillaryBound (bool enabled)
 
std::vector< double > getVofBlockForce (int c)
 
vof::VofCurvature::Stats vofBlockCurvatureStats () const
 
void setRhoFaceHarmonic (bool on)
 
void setPressureExactResidual (bool on)
 WO-R2 item 3 — the exact (matrix-free, double, flux-form) level-0 operator apply in the residual and the Krylov matvec.
 
void setOutflowOperatorCoefficient (bool on)
 WO-R2 item 1 ABLATION: set_outflow_operator_coefficient(False) restores the pre-WO-R2 operator, whose Dirichlet domain-face rows carried the literal openness 1.0 instead of the variable-density coefficient open_f*rho0/rho_f.
 
bool outflowOperatorCoefficient () const
 
bool pressureExactResidual () const
 
bool rhoFaceHarmonic () const
 
void setOutflowRhoCorrection (bool on)
 
bool outflowRhoCorrection () const
 
void setVofInflow (int f, double value)
 Colour of the fluid entering through inflow face f (0..5 = -x,+x,-y,+y,-z,+z), in [0,1].
 
void setVofInflowProfile (int f, const std::vector< double > &prof, int nb, int nc)
 Per-position inflow colour on face f: prof is (nb, nc) on the INNER grid of the face's two perpendicular axes (the same layout and the same clamp resampling set_domain_bc_profile uses for the velocity).
 
void setVofBackflow (int f, double value)
 inletOutlet backflow colour on outflow face f (default 0 = gas): where the boundary face velocity points back INTO the domain, the colour ghost carries this value instead of the zero-gradient copy (Rusche 2002 thesis section 4; OpenFOAM inletOutletFvPatchField).
 
bool vofBcActive () const
 
std::vector< double > vofBcVolumes () const
 Signed liquid volume that crossed each of the six domain faces during the LAST colour advection, in cell-volume units, POSITIVE for liquid entering the domain.
 
std::vector< double > vofBcVolumesTotal () const
 The same, accumulated since enable_vof() (or the last resetVofBcVolumes()).
 
void resetVofBcVolumes ()
 
void vofApplyColourBc (CCField f)
 The colour field's boundary rules, applied at the END of vofFillGhosts — i.e.
 
void vofBcPropGhosts (CCField f)
 WO-R item 5 — the Neumann property policy at an inflow face.
 
void vofRebuildBcBlock ()
 (Re)build everything that lives on the g=3 block for this rung: the out-of-domain mask and the resampled boundary-colour profiles.
 
CCField resampleFaceScalar (const std::vector< double > &prof, int nb, int nc, int face, C3 ext, int g, int &outNc)
 Clamp-resample a per-position face scalar from the user's (nb, nc) INNER grid onto the ghost-inclusive (b, c) plane of an extended block, so the fill kernel indexes it directly by face position.
 
void checkVofBcFace (int f, int wantType, const char *who)
 A VoF boundary colour is only meaningful on a face that already carries the matching domain BC, and getting that wrong is silent (the ghost band would be written and then never read as boundary data).
 
void vofBcArm ()
 Arm the rung: install the mask, rebuild the profiles, and zero the boundary volume ledger.
 
void vofHarvestBcVolumes ()
 Move the advector's per-face boundary volume ledger into the solver's, once per advection.
 
void computeVofCurvature ()
 
vof::VofCurvature::Stats vofCurvatureStats () const
 
std::vector< double > getVofCurvature ()
 The interface curvature kappa = 2H in the caller's units, i.e.
 
std::vector< double > getVofCurvatureBranch ()
 
void setVofCurvatureWeightWidth (double d)
 
double vofCurvatureWeightWidth () const
 
void setVofCurvatureMixedHeightFit (bool on)
 
bool vofCurvatureMixedHeightFit () const
 
void setSurfaceTension (double sigma)
 
double surfaceTension () const
 The surface tension in the caller's units (what set_surface_tension was given).
 
void setVofInterfaceEps (double eps)
 
double vofInterfaceEps () const
 
void setVofBlockKappaClip (bool enabled, double kappaMaxPhys=-1.0)
 
void setCsfMode (int m)
 
int csfMode () const
 
bool vofBlockCsf () const
 
bool csfActive () const
 
void setVofKappaFrozen (bool on)
 
bool vofKappaFrozen () const
 
void setVofKappaConstant (double kappa)
 kappa is a PHYSICAL curvature, 1/length (the internal field is 1/h; see vof_curvature()).
 
double capillaryDt ()
 The Brackbill capillary limit in the CALLER's time unit.
 
double capillaryDtInternal ()
 The same limit in the solver's index time (per tRef) — what the step's own guards compare to.
 
void setCapillaryCfl (double f)
 
double capillaryCfl () const
 
VofStepLimits vofStepLimits ()
 Both limits at the current state, in the CALLER's time unit (courant is dimensionless).
 
double phaseDensitySum ()
 
void phaseDensityRange (double &lo, double &hi)
 
double stepAdaptive (double cflTarget, double capillaryCflTarget, double dtMax)
 
void vofStepPrecheck ()
 
std::string capillaryThrowMessage (double cap) const
 
void updateVofCurvature ()
 
void advectVof ()
 
void enableVofMomentum (double rhoGasPhys, double rhoLiquidPhys)
 rhoGas / rhoLiquid are PHYSICAL densities, the same numbers the rho closure is given.
 
bool vofMomentumEnabled () const
 
void setVofRhoFloorFrac (double f)
 
double vofRhoFloorFrac () const
 
double vofRhoFloor () const
 
void setVofMomentumMuscl (bool on)
 
void setVofMomentumCellFlag (bool on)
 
void setVofFluxClamp (bool on)
 
vof::MomentumConsistentAdvector::Diagnostics vofMomentumDiagnostics ()
 
std::vector< double > getVofAdvectedVelocity (int c)
 
void advectVofMomentum ()
 
void enablePhaseChange (double rhoG, double rhoL, double hlv)
 Turn on phase change.
 
bool phaseChangeEnabled () const
 
void setMassFluxUniform (double v)
 Prescribe a UNIFORM mass flux (P0), in mass per area per time.
 
void setMassFlux (const std::vector< double > &v)
 Prescribe a per-cell mass flux (P0), x-fastest over the inner region; units and call-order rule as setMassFluxUniform.
 
void setPhaseChangeThermal (const std::string &tname, double Tsat, double kg, double kl, double Rint)
 P1: compute mdot each step from the registered scalar tname by the one-sided pure-cell weighted least-squares gradients of vof/phase_change.hpp.
 
void setPhaseChangeThermalOff ()
 
void setPhaseChangePlaneDirichlet (bool on)
 The PLANE-ANCHORED (ghost-fluid) Dirichlet condition, ON by default.
 
bool phaseChangePlaneDirichlet () const
 
void setPhaseChangeQuadraticFit (bool on)
 The QUADRATIC one-sided gradient fit (T - T_G = G phi + Q phi^2) instead of the linear one.
 
bool phaseChangeQuadraticFit () const
 
void setPhaseChangeArea (int mode)
 WO-P3c — which geometry the interfacial AREA comes from.
 
int phaseChangeArea () const
 
double vofInterfaceArea ()
 The summed interfacial area over the inner region, PHYSICAL (globally reduced under MPI) — the E7 gallery's vof_interface_area().
 
vof::VofInterfaceArea::Stats pcAreaCascadeCompute ()
 Run the cascade area driver on the (already bridged) g = 3 colour block.
 
SField pcAreaCascadeField () const
 The area field the last pcAreaCascadeCompute filled (either driver).
 
void setPhaseChangeEnergy (double rcpGas, double rcpLiquid)
 Turn on the CONSISTENT energy transport (VOF_PLAN §9 item 6) for the scalar set_phase_change_thermal names: rho c_p T is advected with the colour advection's OWN geometric fluxes (vof/energy_advect.hpp) instead of the scalar module's Koren TVD flux, and the implicit solve carries per-cell k(C) (the k_gas/k_liquid of set_phase_change_thermal) and a rho c_p(C) time term instead of a constant diffusivity.
 
void setPhaseChangeEnergyMuscl (bool on)
 MinMod-limited donor reconstruction of the face temperature in the consistent energy flux (vof/energy_advect.hpp).
 
bool phaseChangeEnergyMuscl () const
 
void setPhaseChangeEnergyOff ()
 
bool phaseChangeEnergy () const
 
void setPhaseChangeBudget (bool on)
 WO-P3f: turn the ENERGY BUDGET instrument on.
 
bool phaseChangeBudget () const
 
void setPhaseChangeCarryConserve (bool on)
 WO-P3f: make the per-cell Dirichlet overwrite ENTHALPY-CONSERVING.
 
bool phaseChangeCarryConserve () const
 
void setPhaseChangeFitCurvature (double kappa)
 WO-P3f INSTRUMENT: prescribe the interface curvature kappa = div(n) the one-sided fits use to correct their sample distances (vof::pcCurvedDistance).
 
double phaseChangeFitCurvature () const
 
void setPhaseChangeEnergyOrder (int order)
 WO-P3g — the SECOND-ORDER interfacial energy operator, as one package.
 
int phaseChangeEnergyOrder () const
 
void setPhaseChangeMdotOperator (bool on)
 WO-P3g item 1: take mdot from the energy operator's own interfacial flux instead of the one-sided least-squares fit.
 
bool phaseChangeMdotOperator () const
 
void setPhaseChangeGfmOrder (int order)
 WO-P3g item 2: the order of the one-sided (ghost-fluid) Dirichlet row.
 
int phaseChangeGfmOrder () const
 
void setPhaseChangeCurvatureDistance (bool on)
 WO-P3g item 3: measure the GFM row's theta and the one-sided fits' sample distances to the CURVED interface, with the mean curvature taken per cell from the V3 cascade.
 
bool phaseChangeCurvatureDistance () const
 
void setPhaseChangeDepositFallback (bool on)
 WO-P3f open item 6 / WO-P3g — the divergence source's 5^3 fallback target, as a setter (it was only reachable through set_phase_change_deposit_fallback).
 
bool phaseChangeDepositFallback () const
 
double phaseChangeQOperator () const
 The operator's interfacial heat (power), physical.
 
double phaseChangeQOrphan () const
 
double phaseChangeCarryDeposited () const
 The carry ledger, physical: an energy with the consistent transport on, and a temperature times a volume without it (the constant-diffusivity scalar carries no heat capacity).
 
double phaseChangeCarryLost () const
 
PhaseChangeBudget phaseChangeBudgetValues () const
 The budget, physical: energies and powers with the consistent transport on, temperature x volume (and per time) without it — see phaseChangeCarryDeposited.
 
double pcBandDivergence ()
 The BAND-EXTENDED LIQUID VELOCITY of VOF_PLAN §9 item 3, as a MEASUREMENT rather than a switch.
 
void pcUpdateEnergyProps ()
 Refresh k(C) and (rho c_p)(C) on the G=2 block from the current colour.
 
void pcRefreshUnits ()
 Re-derive the INTERNAL phase-change constants (pcRhoG_ ... pcRcpL_) from the caller's physical ones (pc*Phys_) with the current reference scales, and push them to the consumers that cache them (the energy advector, the k(C)/rho c_p(C) fields).
 
void requireScalesPinned (const char *who, bool needRho) const
 Under an armed extent, refuse a call that writes a dimensional value into a FIELD before the reference scales it converts with are pinned (rho: the first set_rho, dt: the first set_dt).
 
double closureTargetToInt (const std::string &target) const
 The internal-per-physical factor of a closure TARGET: rho, mu, force_x/y/z; 0.0 for any other field (its units are not known — the caller writes it in internal units).
 
void closureRefreshUnits (Closure &cl)
 Re-derive a closure's internal p / tabY from its physical pPhys / tabYPhys with the current reference scales (setPropertyModel/Table, and refreshUnitDerived for all of them).
 
void closureUnitsNotice (const std::string &target) const
 Under a physical domain, say on stderr that a closure on a target of unknown dimension takes its parameters in internal units (once, at registration).
 
double pcLedgerEnergyToPhys () const
 The factor from an internal phase-change ledger entry (a per-cell sum of rcp' dT) to the caller's units: joules with the consistent transport on, temperature x volume without it.
 
void vofExchangeScalar (CCField f)
 The colour block's ghost policy WITHOUT the colour-specific rules (no solid-band fill, no VoF boundary colour): the halo/periodic exchange plus the non-periodic zero-gradient clamp.
 
void setDivergenceSource (const std::vector< double > &v)
 A PRESCRIBED extra divergence source (1/time, physical; set_dt must precede it under an extent, requireScalesPinned), x-fastest over the inner region, added to the Poisson RHS exactly like the phase-change deposit: the projection then solves for div(open u) = S_pc + S_user.
 
void clearDivergenceSource ()
 
void setDivergenceSink (const std::vector< double > &w)
 WO-P23: an AUTO-BALANCED sink region for the phase-change divergence source.
 
void clearDivergenceSink ()
 
void applyPhaseChange (double dtPhysArg)
 Kinematic entry point (the P0a/P1 driver): build mdot/A_G/n from the current colour and temperature, deposit the divergence source (for the census only — nothing is projected here) and apply the interface regression.
 
void phaseChangeStep ()
 The in-step driver: everything applyPhaseChange does, at the head of step().
 
PhaseChangeDiagnostics phaseChangeDiagnostics ()
 
void pcBuildInterface ()
 (1) The interface build: for every inner interfacial cell reconstruct the PLIC plane from the canonical G=2 colour, store its area and unit normal, evaluate mdot (thermal or prescribed), and decide which pure gas cell will receive the divergence source.
 
void pcScatterSource ()
 (2) Deposit each interfacial cell's source into its chosen pure-gas cell, as a GATHER (each receiving cell scans the 5^3 box for donors that named it).
 
void pcRegress (double dt)
 (3) The regression: two Jacobi passes over the exchanged per-cell data, so the clip deficit is redistributed with a FIXED summation order (bitwise across decompositions).
 
void pcUpdateCurvature ()
 The per-cell Dirichlet mask of the energy scalar: T = T_sat + mdot R_int in every interfacial cell, released everywhere else.
 
void pcBuildInDomain ()
 WO-P3g — 1 on every cell that CARRIES A ROW in the energy solve, 0 otherwise.
 
void pcUpdateThermalMask ()
 
void pcZeroDomainGhosts (CCField f)
 Zero the two ghost layers on every NON-periodic domain face this rank owns.
 
void pcCarryDeposit (ScalarField &sc)
 WO-P3f — the enthalpy the per-cell Dirichlet overwrite destroys, returned to the phase it came from.
 
void pcCarryApply (ScalarField &sc)
 WO-P3f: consume pcCarrySrc_ into the energy solve's time base.
 
void pcBudgetPre (ScalarField &sc)
 WO-P3f, the energy-budget instrument, part 1: the state BEFORE the energy solve, and the class-change accounting against the previous step.
 
void pcBudgetPost (ScalarField &sc)
 WO-P3f, part 2: the state AFTER the energy solve, the heat the plane-anchored rows actually delivered across the interface, and the class snapshot the NEXT step compares against.
 
void pcApplyDivergenceSource (CCField div)
 Subtract the phase-change (and any prescribed) divergence source from div_ so the deflated pressure solve delivers div(open u) = S.
 
double pcEffInterfaceEps () const
 The colour tolerance that decides which cells are INTERFACIAL, and it has to be at least the colour advector's own wisp tolerance.
 
double pcEffPureEps () const
 …and the mirror statement: a cell the ADVECTOR treats as a pure phase is a pure phase here too, or the source deposit's "find a pure gas cell" walk rejects exactly the cells the colour field has already emptied and the source is left in an interfacial cell (measured: band_div 2.2e+02 on the P2 sucking gate with only the interfacial tolerance raised).
 
void requirePhaseChange (const char *who) const
 
ScalarField & scalarField (const std::string &name)
 
void scalarDirichletMask (const std::string &name)
 Allocate (idempotently) the per-cell Dirichlet mask + value of a registered scalar.
 
void setPropertyModel (const std::string &target, ClosureKind kind, const std::string &in0, const std::string &in1, const std::vector< double > &params)
 
void setDensityMode (bool variable)
 
bool hasCutcellPressure () const
 
void setPorousContinuity (bool on)
 
void syncPorousPrev ()
 
void setPorousDepsDt (bool on)
 
void setPorousConservative (bool on)
 
void setPressureUnderRelax (double w)
 
void setPropertyMode (bool variable, bool harmonic)
 
void setVariableRotational (int mode, double chi)
 
void setPropertyTable (const std::string &target, const std::string &in0, const std::vector< double > &xs, const std::vector< double > &ys)
 
void updateProperties ()
 
void enableCellForce ()
 
void enableDrag ()
 
void configurePorousDragSolver ()
 
void addDragDiagonal (int c)
 
void patchScalarDirichletFaceVar (CCField AC, CCField band, CCField kc, int a, int side)
 
void patchScalarDirichletFace (CCField AC, CCField band, double Din, int a, int side)
 
void applyScalarBcFace (CCField c, int a, int side, int type, double val, bool edges=false)
 

Additional Inherited Members

- Public Types inherited from peclet::flow::Solver< Grid >
using FV = Kokkos::View< MReal *, CCMem >
 
- Static Public Member Functions inherited from peclet::flow::Solver< Grid >
static double vofWallPlaneSdf (int gx, int gy, int gz, I3 gs, int mask)
 
static constexpr double defaultVofWispEps ()
 The value enableVof starts from.
 
- Static Public Attributes inherited from peclet::flow::Solver< Grid >
static constexpr int G = 2
 
static constexpr int kVofG = 3
 

Detailed Description

template<class Grid>
struct BoundSolver< Grid >

Definition at line 179 of file flow_bindings.cpp.

Member Function Documentation

◆ release()

template<class Grid >
void BoundSolver< Grid >::release ( )
inlineoverridenoexcept

Definition at line 181 of file flow_bindings.cpp.


The documentation for this struct was generated from the following file: