OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
SolverOptions2D.hpp
Go to the documentation of this file.
1
13#ifndef OPENSWMM_ENGINE_2D_SOLVER_OPTIONS_HPP
14#define OPENSWMM_ENGINE_2D_SOLVER_OPTIONS_HPP
15
16#include <cstdint>
17#include <string>
18
19namespace openswmm::twoD {
20
34enum class LinearSolverType : int8_t {
35 GMRES = 0,
36 BICGSTAB = 1,
37 TFQMR = 2
38};
39
63enum class PreconditionerType : int8_t {
64 NONE = 0,
65 JACOBI = 1,
66 ILU = 2
67 // AMG = 3 ///< Reserved for Phase 2 (hypre BoomerAMG).
68};
69
77 double max_timestep = 10.0;
78 double min_timestep = 0.001;
79 double rel_tolerance = 1.0e-4;
80 double abs_tolerance = 1.0e-6;
81 double dry_depth = 0.001;
82 double limiter_epsilon = 1.0e-6;
83 double coupling_cd = 0.65;
84 int max_krylov_dim = 30;
86 int max_cvode_steps = 500;
87 bool report_2d = true;
88
91
93 std::string mesh_file;
94
98 std::string output_file;
99};
100
101} // namespace openswmm::twoD
102
103#endif // OPENSWMM_ENGINE_2D_SOLVER_OPTIONS_HPP
Definition NodeCoupling.cpp:15
PreconditionerType
Preconditioner selector for the Krylov inner solver.
Definition SolverOptions2D.hpp:63
@ NONE
Phase 1: WIRED (no preconditioning).
@ JACOBI
Phase 1: WIRED (diagonal heuristic).
@ ILU
Reserved; rejected at initialize() in Phase 1.
LinearSolverType
Krylov linear solver selector for the BDF + Newton + Krylov stack.
Definition SolverOptions2D.hpp:34
@ BICGSTAB
Reserved; rejected at initialize() in Phase 1.
@ TFQMR
Reserved; rejected at initialize() in Phase 1.
@ GMRES
Phase 1: WIRED (SUNLinSol_SPGMR).
Configuration for the 2D surface routing CVODE solver.
Definition SolverOptions2D.hpp:76
int coupling_interval
0 = every SWMM step
Definition SolverOptions2D.hpp:85
int max_krylov_dim
Max Krylov subspace dimension.
Definition SolverOptions2D.hpp:84
PreconditionerType preconditioner
Definition SolverOptions2D.hpp:90
double limiter_epsilon
Slope limiter epsilon.
Definition SolverOptions2D.hpp:82
LinearSolverType linear_solver
Definition SolverOptions2D.hpp:89
double rel_tolerance
CVODE relative tolerance.
Definition SolverOptions2D.hpp:79
double max_timestep
Max CVODE internal step (s)
Definition SolverOptions2D.hpp:77
std::string output_file
Definition SolverOptions2D.hpp:98
double dry_depth
Dry cell threshold (m)
Definition SolverOptions2D.hpp:81
bool report_2d
Write 2D results to output.
Definition SolverOptions2D.hpp:87
double coupling_cd
Default discharge coefficient.
Definition SolverOptions2D.hpp:83
int max_cvode_steps
Max CVODE steps per advance.
Definition SolverOptions2D.hpp:86
std::string mesh_file
Path from [2D_MESH_FILE] FILE token. Empty = mesh is inline in main .inp.
Definition SolverOptions2D.hpp:93
double abs_tolerance
CVODE absolute tolerance (m)
Definition SolverOptions2D.hpp:80
double min_timestep
Min CVODE internal step (s)
Definition SolverOptions2D.hpp:78