#include <PressurizedHeadSolver.hpp>
◆ anonymous enum
| anonymous enum : std::uint8_t |
Face treatment decided by classify(). Values are load-bearing for the assembly switch; kNone faces are untouched. kFull — both sides pressurized: Casulli form (steady state reduces to ΔH/L = −S_f exactly — the head-loss invariance gate). kDelta — a transition face (exactly one side pressurized, with a pressurized CELL side). CLASSIFICATION ONLY in R2a: the face stays fully explicit — Godunov flux and census bound. Folding transitions in was built and MEASURED before being cut: every memoryless fold (frozen-ghost delta form, free cell as a soft unknown, free-side depth thresholds at 0.05 and 0.5·y_full) re-times an ADVANCING fill — bore arrival 65/345 s, 60/545 s, 75/1320 s at c = 150/660 against the 42 s quasi-steady analytic — because any instantaneous threshold is swept through transiently while a cell fills. A STANDING transition (backwater below an internal jump) is only distinguishable by cadence, so releasing its census throttle belongs to the LTS composition (R2b), which can put the front on its own fine tier. kNone — everything else: gated/culvert faces (their laws stand), closed ends, and faces with no pressurized CELL side (a pressurized ghost against a free cell is the classic manhole bore).
| Enumerator |
|---|
| kNone | |
| kFull | |
| kDelta | |
◆ anyImplicit()
| bool openswmm::fv::PressurizedHeadSolver::anyImplicit |
( |
| ) |
const |
|
inlinenoexcept |
Report whether the last classification contains any fully implicit face.
- Returns
- True when imp_faces_ is nonempty; this does not certify solve convergence or endpoint validity.
◆ cellPressurized()
Test pressure membership shared by classification and timestep census.
When TPA flags exist they must contain every cell; this predicate does not also check the geometry is closed. No flags or history are changed.
- Parameters
-
| [in] | mesh | Borrowed immutable aligned FV topology/geometry; index arrays are unchecked. |
| [in] | state | Borrowed current cell depths/regime flags and node heads aligned to mesh. |
| [in] | cell | Valid nonnegative mesh cell index. |
- Returns
- Nonzero cell_tpa flag when that vector is nonempty; otherwise a closed geometry with depth>=y_crown.
◆ classify()
| bool openswmm::fv::PressurizedHeadSolver::classify |
( |
const PressurizedView & | v | ) |
|
Rebuild pressure membership, implicit face ownership and union-find connectivity.
Resets pressure/fold masks and implicit faces. SLOT membership uses closed cells at/above y_crown; nonempty cell_tpa instead supplies history flags. Only kFull faces are implicit; kDelta remains explicit. An eligible algebraic node folds only when every incident face is full, no fixed head applies, and no real pond demotes it. Builds unknown maps and union-find roots; component CSR is built later during solve. Changes internal scratch only, can allocate/throw, and invalidates previous masks/candidate preparation. Calls on one solver instance require serialization.
- Parameters
-
| [in] | v | Borrowed fully aligned mesh/state, active face/cell lists, algebraic-node mask/full-volume arrays and optional forcing. Required pointers are non-null; referenced topology indices are valid. |
- Returns
- True if at least one active kFull face exists; false if no active pressure cell or no eligible full face.
◆ faceModeOf()
Classify one face as explicit, full pressure or a pressure/free transition.
Any nonzero gate mask, any culvert assignment, or a closed end excludes implicit treatment regardless of current flux direction. Node pressure comes from ghostPressurized. This predicate ignores active timestep masks; classify applies those separately.
- Parameters
-
| [in] | mesh | Borrowed immutable aligned FV topology/geometry; index arrays are unchecked. |
| [in] | state | Borrowed current cell depths/regime flags and node heads aligned to mesh. |
| [in] | f | Valid global face index; all incident cells/nodes must be valid or use the documented -1 boundary sentinel. |
- Returns
- kFull when both sides are pressure and at least one cell is pressure; kDelta for exactly one pressure side with a pressure cell; kNone otherwise.
◆ finalizeCells()
| void openswmm::fv::PressurizedHeadSolver::finalizeCells |
( |
const PressurizedView & | v | ) |
|
Replace pressure-cell discharge with its solved face through-flow after conservative update.
For classified pressurized cells owning an unknown, transforms the two current face mass fluxes into the cell axis, averages them into state.cell_q and refreshes cell_u=q/A (zero velocity at dry area). Leaves area/depth/node state unchanged. Empty implicit set is a no-op. Run after updateCells/updateNodes, using the same classified geometry and current face flux ledger.
- Parameters
-
| [in,out] | v | Borrowed aligned view matching the last successful classify, with fresh explicit face states/fluxes, current old-state heads/areas and node carry/source arrays. All required pointers and ranges remain live for the call; no view pointer is retained. |
◆ foldedNodes()
| const std::vector< std::uint8_t > & openswmm::fv::PressurizedHeadSolver::foldedNodes |
( |
| ) |
const |
|
inlinenoexcept |
Borrow the last classification folded-node mask.
Consumers skip their explicit algebraic relaxation. Contents/storage can change on the next classify; the reference is valid only while this solver object lives.
- Returns
- Const node-indexed mask reference; entries with value one own a pressure continuity row.
◆ ghostPressurized()
Test the node-side ghost pressure state in the adjacent cell geometry.
Sealed means positive node_sur_depth, allowing sub-atmospheric TPA pressure. No physical head floor or branch mutation is applied.
- Parameters
-
| [in] | mesh | Borrowed immutable aligned FV topology/geometry; index arrays are unchecked. |
| [in] | state | Borrowed current cell depths/regime flags and node heads aligned to mesh. |
| [in] | f | Valid face index; a missing node or adjacent cell returns false. |
- Returns
- False for open geometry; otherwise true for a sealed node adjoining a flagged TPA cell, or node_head-face_zb>=y_crown.
◆ solve()
| void openswmm::fv::PressurizedHeadSolver::solve |
( |
const PressurizedView & | v, |
|
|
double | dt ) |
Predict fully pressurized face discharges with an implicit head system.
Prepares friction/conveyance coefficients, solves each pressure component, and demotes out-of-range folded heads to Dirichlet values for at most four passes per solve. Uses Thomas on paths and bounded Jacobi-CG elsewhere; no convergence status is exposed. Applies up to three storage secant corrections by default (process-cached atoi(OPENSWMM_FV_PRESS_SECANT_PASSES) overrides); this Picard correction need not converge for stiff crown transitions. Publishes f_mass, f_flux.mass/sstar, f_sstar and folded node heads; cell A/Q/volume update remains the caller responsibility. Allocations can throw; no rollback guarantee is supplied. Call finalizeCells after the conservative cell/node update.
- Parameters
-
| [in,out] | v | Borrowed aligned view matching the last successful classify, with fresh explicit face states/fluxes, current old-state heads/areas and node carry/source arrays. All required pointers and ranges remain live for the call; no view pointer is retained. |
| [in] | dt | Positive substep duration in seconds; <=0 or an empty implicit face set is a no-op. |
◆ solveCandidate()
Try a guarded nonlinear SLOT-storage pressure predictor.
Requires prior classify against the same state. Uses actual old conserved areas, closed SLOT geometry and zero-storage algebraic nodes; pondable or storage folded nodes and nonpositive/nonfinite conductances are rejected. Only after convergence publishes pressure face ledgers and folded heads. Other state remains caller-owned; failed attempts can change internal candidate scratch but do not publish these ledgers. Allocation exceptions propagate.
- Parameters
-
| [in,out] | v | Borrowed aligned view matching the last successful classify, with fresh explicit face states/fluxes, current old-state heads/areas and node carry/source arrays. All required pointers and ranges remain live for the call; no view pointer is retained. |
| [in] | dt | Finite positive substep duration in seconds. |
| [in] | controls | Nonlinear residual/iteration/workspace controls passed to NonlinearPressureStorage. |
- Returns
- Nonlinear diagnostics/status; a default non-converged result for an empty set, invalid dt, TPA state or unsupported folded-node/face configuration.
◆ verifyCandidateEndpoint()
Check the actual post-update endpoint against the last nonlinear candidate equations.
Call only after a successful solveCandidate, real limiter/cell/node update, and matching unchanged topology/classification. Reads published state/fluxes and updates diagnostic scratch; never repairs the endpoint. A candidate-free call can vacuously pass, so this is not an independent solver validity test. Allocation errors propagate.
- Parameters
-
| [in,out] | v | Borrowed aligned view matching the last successful classify, with fresh explicit face states/fluxes, current old-state heads/areas and node carry/source arrays. All required pointers and ranges remain live for the call; no view pointer is retained. |
| [in] | dt | Same positive substep seconds used for candidate preparation/update. |
| [in] | controls | Residual budgets matching the candidate solve: absolute_volume ft3 and relative_volume dimensionless. |
- Returns
- True if bounded finite heads, original volume/continuity residuals, folded carry and every implicit face law meet their volume budgets.
The documentation for this class was generated from the following files: