OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::runoff::SourceWaterDriver::State Struct Reference
Collaboration diagram for openswmm::runoff::SourceWaterDriver::State:

Public Member Functions

 State (const SimulationContext &c)
 Own the initial context independently of the caller; kernels remain uninitialized. Raw external handles/callbacks retain their original ownership and must not publish through private source state. Allocation failures propagate before advancement.
 
SimulationContext & mutableContext ()
 Detach a shared context snapshot before any context mutation. State copies share only unchanged context values. Advancement and checkpoint reads obtain private ownership here; initialization starts with an already unique owner. Allocation failures leave other snapshots unchanged. Caller serializes mutation with copying/borrowing, as required by the existing driver contract.
 
surface::SourceSnow & mutableSnow ()
 Detach the snow owner before mutation; immutable snapshots may share it. Active owners detach before trial callbacks or checkpoint reads. Inactive owners remain immutable: advance/checkpoint are no-ops and initialization is unique. Allocation failures leave the other snapshots unchanged.
 
 State (const State &s)
 Copy histories while sharing unchanged private context and snow snapshots. LID water is cloned without report writers; other histories/ledgers/queues copy. Mutable context/snow owners detach before use. External handle/callback references retain their original ownership. Copy failures leave s unchanged.
 

Public Attributes

std::shared_ptr< SimulationContext > ctx
 
RunoffSolver runoff
 
lid::LIDSolver lids
 
std::shared_ptr< surface::SourceSnow > snow = std::make_shared<surface::SourceSnow>()
 
bool partitioned = false
 
bool hydraulic_returns = false
 
double hydraulic_return_end = 0
 
std::vector< double > inside
 
std::vector< double > runon
 
std::vector< double > pervious_return
 
std::vector< SourceSurfaceReturn > aquifer_returns
 
std::vector< SourceOutfallReturn > outfall_returns
 
std::vector< SourceWaterLedger > ledger
 
std::vector< SourceWaterDelivery > deliveries
 
std::vector< SourceAtmosphericLedger > atmosphere
 
std::vector< std::string > pollutant_names
 
std::vector< SourcePollutantLedger > pollutants
 
std::vector< std::vector< double > > runon_mass
 
std::vector< std::vector< double > > return_mass
 

Constructor & Destructor Documentation

◆ State() [1/2]

openswmm::runoff::SourceWaterDriver::State::State ( const SimulationContext & c)
inlineexplicit

Own the initial context independently of the caller; kernels remain uninitialized. Raw external handles/callbacks retain their original ownership and must not publish through private source state. Allocation failures propagate before advancement.

Here is the caller graph for this function:

◆ State() [2/2]

openswmm::runoff::SourceWaterDriver::State::State ( const State & s)
inline

Copy histories while sharing unchanged private context and snow snapshots. LID water is cloned without report writers; other histories/ledgers/queues copy. Mutable context/snow owners detach before use. External handle/callback references retain their original ownership. Copy failures leave s unchanged.

Here is the call graph for this function:

Member Function Documentation

◆ mutableContext()

SimulationContext & openswmm::runoff::SourceWaterDriver::State::mutableContext ( )
inline

Detach a shared context snapshot before any context mutation. State copies share only unchanged context values. Advancement and checkpoint reads obtain private ownership here; initialization starts with an already unique owner. Allocation failures leave other snapshots unchanged. Caller serializes mutation with copying/borrowing, as required by the existing driver contract.

◆ mutableSnow()

surface::SourceSnow & openswmm::runoff::SourceWaterDriver::State::mutableSnow ( )
inline

Detach the snow owner before mutation; immutable snapshots may share it. Active owners detach before trial callbacks or checkpoint reads. Inactive owners remain immutable: advance/checkpoint are no-ops and initialization is unique. Allocation failures leave the other snapshots unchanged.

Member Data Documentation

◆ aquifer_returns

std::vector<SourceSurfaceReturn> openswmm::runoff::SourceWaterDriver::State::aquifer_returns

◆ atmosphere

std::vector<SourceAtmosphericLedger> openswmm::runoff::SourceWaterDriver::State::atmosphere

◆ ctx

std::shared_ptr<SimulationContext> openswmm::runoff::SourceWaterDriver::State::ctx

◆ deliveries

std::vector<SourceWaterDelivery> openswmm::runoff::SourceWaterDriver::State::deliveries

◆ hydraulic_return_end

double openswmm::runoff::SourceWaterDriver::State::hydraulic_return_end = 0

◆ hydraulic_returns

bool openswmm::runoff::SourceWaterDriver::State::hydraulic_returns = false

◆ inside

std::vector<double> openswmm::runoff::SourceWaterDriver::State::inside

◆ ledger

std::vector<SourceWaterLedger> openswmm::runoff::SourceWaterDriver::State::ledger

◆ lids

lid::LIDSolver openswmm::runoff::SourceWaterDriver::State::lids

◆ outfall_returns

std::vector<SourceOutfallReturn> openswmm::runoff::SourceWaterDriver::State::outfall_returns

◆ partitioned

bool openswmm::runoff::SourceWaterDriver::State::partitioned = false

◆ pervious_return

std::vector<double> openswmm::runoff::SourceWaterDriver::State::pervious_return

◆ pollutant_names

std::vector<std::string> openswmm::runoff::SourceWaterDriver::State::pollutant_names

◆ pollutants

std::vector<SourcePollutantLedger> openswmm::runoff::SourceWaterDriver::State::pollutants

◆ return_mass

std::vector<std::vector<double> > openswmm::runoff::SourceWaterDriver::State::return_mass

◆ runoff

RunoffSolver openswmm::runoff::SourceWaterDriver::State::runoff

◆ runon

std::vector<double> openswmm::runoff::SourceWaterDriver::State::runon

◆ runon_mass

std::vector<std::vector<double> > openswmm::runoff::SourceWaterDriver::State::runon_mass

◆ snow

std::shared_ptr<surface::SourceSnow> openswmm::runoff::SourceWaterDriver::State::snow = std::make_shared<surface::SourceSnow>()

The documentation for this struct was generated from the following file: