OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::fv::ImplicitNetworkSolver Class Reference

#include <ImplicitNetworkSolver.hpp>

Collaboration diagram for openswmm::fv::ImplicitNetworkSolver:

Classes

struct  BlockIluDiagnostics
 
struct  CondensationControls
 
struct  CondensationDiagnostics
 
struct  Controls
 
struct  Endpoint
 
struct  Evaluation
 
struct  FaceReceipt
 
struct  Linearization
 
struct  LinearResult
 
class  LinearWorkspace
 
struct  Matrix
 
struct  Problem
 
struct  Result
 
struct  Trial
 
struct  WorkspaceDiagnostics
 

Public Types

enum class  Regime {
  PressurizedOnly ,
  BoundedWetSlot
}
 
enum class  CondensationStatus {
  NotAttempted ,
  Converged ,
  InvalidInput ,
  UnsupportedStencil ,
  BlockPivot ,
  FillLimit ,
  MemoryLimit ,
  InterfaceFailure ,
  ReconstructionFailure
}
 
enum class  Preconditioner {
  ScalarIlu0 ,
  BlockIlu0
}
 
enum class  LinearMethod {
  FullGmres ,
  CondensedThenGmres ,
  CondensedOnly
}
 
enum class  Status {
  Converged ,
  InvalidInput ,
  InitializationFailure ,
  LinearFailure ,
  LineSearchFailed ,
  IterationLimit ,
  NonFinite
}
 

Public Member Functions

Result solve (const Problem &, double dt, const Controls &, Endpoint &)
 Failure leaves Endpoint unchanged; no post-convergence water/Q repairs.
 
std::size_t linearWorkspaceBytes () const
 
void clearLinearWorkspace ()
 

Static Public Member Functions

static bool residual (const Problem &, const Trial &, double dt, Evaluation &)
 
static bool linearize (const Problem &, const Trial &, double dt, double step, Linearization &)
 
static LinearResult solveLinear (const Matrix &, const std::vector< double > &rhs, const NativeGmres::Controls &, std::vector< double > &, LinearWorkspace *=nullptr)
 
static LinearResult solveBlockLinear (const Matrix &, const std::vector< double > &rhs, std::size_t cell_blocks, const NativeGmres::Controls &, std::vector< double > &, LinearWorkspace *=nullptr)
 
static LinearResult solveCondensed (const NetworkMeshData &, const Matrix &, const std::vector< double > &rhs, const NativeGmres::Controls &, const CondensationControls &, bool allow_fallback, std::vector< double > &, LinearWorkspace *=nullptr)
 
static bool initializeHeads (const Problem &, Trial &, double tolerance)
 

Detailed Description

Standalone, first-order SLOT experiment, pressurized-only by default with opt-in bounded wet free-surface/transition support. Uses every original cell and shared face geometry, including oriented virtual faces. Junctions have ZERO storage; bounded physical storage uses mesh V(h) tables. Ponding/overflow, structures, losses, dry states, TPA and transport are deliberately unsupported. Ordinary degree-2 nodes retain algebraic heads in both standalone scopes. Typed virtual faces stay direct. No production routing option or GUI selects this solver.

Member Enumeration Documentation

◆ CondensationStatus

Enumerator
NotAttempted 
Converged 
InvalidInput 
UnsupportedStencil 
BlockPivot 
FillLimit 
MemoryLimit 
InterfaceFailure 
ReconstructionFailure 

◆ LinearMethod

Enumerator
FullGmres 
CondensedThenGmres 
CondensedOnly 

◆ Preconditioner

Enumerator
ScalarIlu0 
BlockIlu0 

◆ Regime

Enumerator
PressurizedOnly 
BoundedWetSlot 

◆ Status

Enumerator
Converged 
InvalidInput 
InitializationFailure 
LinearFailure 
LineSearchFailed 
IterationLimit 
NonFinite 

Member Function Documentation

◆ clearLinearWorkspace()

void openswmm::fv::ImplicitNetworkSolver::clearLinearWorkspace ( )
inline

◆ initializeHeads()

bool openswmm::fv::ImplicitNetworkSolver::initializeHeads ( const Problem & p,
Trial & x,
double tolerance )
static

Bracketed algebraic-head initialization with cells held fixed. Does not alter conserved initial area/Q or invent a startup volume step.

Here is the caller graph for this function:

◆ linearize()

bool openswmm::fv::ImplicitNetworkSolver::linearize ( const Problem & p,
const Trial & x,
double dt,
double step,
Linearization & output )
static

Local face/source differences, analytic storage/history derivatives. Sparse graph work; never finite-differences the full network per column.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ linearWorkspaceBytes()

std::size_t openswmm::fv::ImplicitNetworkSolver::linearWorkspaceBytes ( ) const
inline

◆ residual()

bool openswmm::fv::ImplicitNetworkSolver::residual ( const Problem & p,
const Trial & x,
double dt,
Evaluation & output )
static

Pure evaluation; no clock, ledger, node volume, carry or accepted-state writes. Bed/section forces belong ONLY to the corrected face divergence.

Here is the caller graph for this function:

◆ solve()

ImplicitNetworkSolver::Result openswmm::fv::ImplicitNetworkSolver::solve ( const Problem & p,
double dt,
const Controls & controls,
Endpoint & output )

Failure leaves Endpoint unchanged; no post-convergence water/Q repairs.

Here is the call graph for this function:

◆ solveBlockLinear()

ImplicitNetworkSolver::LinearResult openswmm::fv::ImplicitNetworkSolver::solveBlockLinear ( const Matrix & a,
const std::vector< double > & rhs,
std::size_t cell_blocks,
const NativeGmres::Controls & controls,
std::vector< double > & output,
LinearWorkspace * workspace = nullptr )
static

Native mixed-block ILU(0), fixed for one right-preconditioned GMRES solve. The first 2*cell_blocks scalars are cell pairs; the suffix is scalar heads. Complete existing blocks and add missing PRECONDITIONER diagonals only; no off-block fill, equation pins or changes to the original matrix/RHS. Guarded shifts affect only factors. Budget includes all block CSR/factor and Krylov buffers. Failure never publishes a correction.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solveCondensed()

ImplicitNetworkSolver::LinearResult openswmm::fv::ImplicitNetworkSolver::solveCondensed ( const NetworkMeshData & mesh,
const Matrix & a,
const std::vector< double > & rhs,
const NativeGmres::Controls & linear,
const CondensationControls & controls,
bool allow_fallback,
std::vector< double > & output,
LinearWorkspace * workspace = nullptr )
static

Exact eligible conduit-interior block elimination, sparse interface Schur solve and reconstruction of EVERY original scalar correction. Endpoint cells/heads are protected. No shifted exact factors or head pins. An unsafe block/stencil, resource limit, interface or full-residual failure may fall back to original-matrix GMRES after temporary storage is freed. Budget covers owned dynamic buffers, not caller matrix/input/output or allocator/vector-object/stack overhead. Failure never publishes output.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solveLinear()

ImplicitNetworkSolver::LinearResult openswmm::fv::ImplicitNetworkSolver::solveLinear ( const Matrix & a,
const std::vector< double > & rhs,
const NativeGmres::Controls & controls,
std::vector< double > & output,
LinearWorkspace * workspace = nullptr )
static

Native scalar ILU(0) comparator with fixed right-preconditioned GMRES. Guarded diagonal shifts affect ONLY the preconditioner, never A or b. Full-matrix comparator and fallback for solveCondensed below.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: