OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::twoD::SurfaceJacobian Class Reference

Assembles M = I − γ·J (diffusion stencil) in CSR for AMG. More...

#include <SurfaceJacobian.hpp>

Collaboration diagram for openswmm::twoD::SurfaceJacobian:

Public Member Functions

void buildSparsity (const MeshData &mesh)
 
void assemble (const MeshData &mesh, const SurfaceStateData &state, double gamma, double dh_floor=1.0e-9)
 
int rows () const noexcept
 
int nnz () const noexcept
 
const int * rowPtr () const noexcept
 
const int * colIdx () const noexcept
 
const double * values () const noexcept
 
double * values () noexcept
 

Detailed Description

Assembles M = I − γ·J (diffusion stencil) in CSR for AMG.

Member Function Documentation

◆ assemble()

void openswmm::twoD::SurfaceJacobian::assemble ( const MeshData & mesh,
const SurfaceStateData & state,
double gamma,
double dh_floor = 1.0e-9 )

Refresh the CSR values for M = I − γ·J from the current head/edge_flux. Cheap: writes only the precomputed entry positions, no reallocation.

◆ buildSparsity()

void openswmm::twoD::SurfaceJacobian::buildSparsity ( const MeshData & mesh)

Build the static CSR sparsity from the mesh topology. Each row holds the diagonal followed by one entry per distinct non-boundary neighbour (duplicate neighbours, should they occur, are merged). Call once after the topology is final; values start zeroed.

Here is the call graph for this function:

◆ colIdx()

const int * openswmm::twoD::SurfaceJacobian::colIdx ( ) const
inlinenoexcept

◆ nnz()

int openswmm::twoD::SurfaceJacobian::nnz ( ) const
inlinenoexcept

◆ rowPtr()

const int * openswmm::twoD::SurfaceJacobian::rowPtr ( ) const
inlinenoexcept

◆ rows()

int openswmm::twoD::SurfaceJacobian::rows ( ) const
inlinenoexcept

◆ values() [1/2]

const double * openswmm::twoD::SurfaceJacobian::values ( ) const
inlinenoexcept

◆ values() [2/2]

double * openswmm::twoD::SurfaceJacobian::values ( )
inlinenoexcept

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