![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
CSR assembly of the approximate Newton matrix M = I − γ·J for the 2D diffusive-wave surface operator, for use as a preconditioner matrix (hypre BoomerAMG). More...
Go to the source code of this file.
Classes | |
| class | openswmm::twoD::SurfaceJacobian |
| Assembles M = I − γ·J (diffusion stencil) in CSR for AMG. More... | |
Namespaces | |
| namespace | openswmm |
| namespace | openswmm::twoD |
CSR assembly of the approximate Newton matrix M = I − γ·J for the 2D diffusive-wave surface operator, for use as a preconditioner matrix (hypre BoomerAMG).
The Jacobi preconditioner keeps only diag(J); AMG needs the full near-symmetric M-matrix. Both use the SAME per-edge transmissivity the Jacobi psetup computes:
T_e = |edge_flux_e| / max(|h_i − h_j|, dh_floor) J_ii = −(1/A_i) Σ_e T_e (diagonal, == the Jacobi heuristic) J_ij = +(1/A_i) T_e (off-diagonal, neighbour j over e)
so the Newton matrix is M_ii = 1 + (γ/A_i) Σ_e T_e M_ij = −(γ/A_i) T_e.
The sparsity is fixed by the static mesh topology (diagonal + up to three neighbours per row), built once; only the values are refreshed each preconditioner setup.