![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
#include <ChannelGround.hpp>
Public Member Functions | |
| void | clear () |
| Release this contact mapping, borrowed bindings and diagnostic storage. | |
| bool | active () const noexcept |
| Test whether any prepared channel/ground contact exists. | |
| bool | ownsCell (int i) const noexcept |
| Test the resolved thermal contact ownership mask for one cell. | |
| bool | ownsLink (int i) const noexcept |
| Test the resolved thermal contact ownership mask for one link. | |
| const std::vector< int > & | cells () const noexcept |
| Borrow the prepared unique owned cells in increasing mesh-index order. | |
| const std::vector< ChannelGroundContact > & | contacts () const noexcept |
| Borrow the prepared contact segments sorted by link, begin fraction and cell. | |
| std::size_t | contactCount (int link) const noexcept |
| Read the number of mapped contact pieces for a routed link. | |
| double | bedTemperature (int link, double begin=0, double end=1) const noexcept |
| Read the capacity-weighted temperature of physical soil beneath a channel reach. | |
| std::string | initialize (SimulationContext &, const MeshData &, GroundHeatState &, SubsurfaceTransportState &, SurfaceStateData &, double coordinate_to_si) |
| Resolve channel geometry onto shared porous thermal columns and bind borrowed owners. | |
| std::string | advance (const SolverOptions2D &, const std::vector< SurfaceThermalSample > &, double seconds, std::vector< double > &surface_mass) |
| Advance the shared finite channel/soil solve and publish surface temperature-volume. | |
| const std::vector< double > & | channelAtmosphere () const noexcept |
| Borrow cumulative signed atmospheric energy added to routed channel water. | |
| const std::vector< double > & | channelToGround () const noexcept |
| Borrow cumulative signed channel-to-ground contact energy. | |
| const std::vector< double > & | channelSpeciesToGround () const noexcept |
| Borrow cumulative signed species exchange into physical porewater. | |
| const std::vector< double > & | channelThermalIncrement () const noexcept |
| Borrow cumulative net finite thermal energy change of routed water. | |
| std::string | modelIdentity () const |
| Serialize the prepared ownership, contact geometry and transport row identity. | |
| void | checkpoint (openswmm::detail::CompletedSourceArchive &) |
| Read/write mutable contact receipts through the completed-source archive. | |
|
inlinenoexcept |
Test whether any prepared channel/ground contact exists.
| std::string openswmm::twoD::ChannelGroundState::advance | ( | const SolverOptions2D & | options, |
| const std::vector< SurfaceThermalSample > & | samples, | ||
| double | dt, | ||
| std::vector< double > & | surface_mass ) |
Advance the shared finite channel/soil solve and publish surface temperature-volume.
Solve channels, shared ground columns and optional surface water over one source interval.
| [in] | options | Resolved SI solver/thermal controls for column assembly. |
| [in] | samples | Mixed pre-sink surface temperature-volume (degC*m3), water volume m3 and already evaporated volume m3 per mesh cell. Exactly mesh.n_cells() entries are required when surface heat uses ground columns; otherwise samples are unused. Borrowed only during the call. |
| [in] | dt | Finite positive interval s, named seconds in the declaration. |
| [out] | surface_mass | Replaced on success by one degC*m3 value per mesh cell, zero for cells outside this contact solve. Unchanged on inactive return or validation failure before final publish. |
|
noexcept |
Read the capacity-weighted temperature of physical soil beneath a channel reach.
| [in] | link | Zero-based owned routed-link index. |
| [in] | begin | Finite normalized start fraction along the complete link, in [0,1). |
| [in] | end | Finite normalized end fraction, begin < end <= 1. |
|
inlinenoexcept |
Borrow the prepared unique owned cells in increasing mesh-index order.
|
inlinenoexcept |
Borrow cumulative signed atmospheric energy added to routed channel water.
|
inlinenoexcept |
Borrow cumulative signed species exchange into physical porewater.
|
inlinenoexcept |
Borrow cumulative net finite thermal energy change of routed water.
|
inlinenoexcept |
Borrow cumulative signed channel-to-ground contact energy.
| void openswmm::twoD::ChannelGroundState::checkpoint | ( | openswmm::detail::CompletedSourceArchive & | ) |
Read/write mutable contact receipts through the completed-source archive.
Archive mutable channel thermal and native-species cumulative receipts.
| std::runtime_error | Restored vector shapes differ from prepared link/species identity or any value is nonfinite; archive truncation/format failures also propagate. |
|
inline |
Release this contact mapping, borrowed bindings and diagnostic storage.
|
inlinenoexcept |
Read the number of mapped contact pieces for a routed link.
| [in] | link | Zero-based link; invalid/unowned returns zero. |
|
inlinenoexcept |
Borrow the prepared contact segments sorted by link, begin fraction and cell.
| std::string openswmm::twoD::ChannelGroundState::initialize | ( | SimulationContext & | ctx, |
| const MeshData & | mesh, | ||
| GroundHeatState & | soil, | ||
| SubsurfaceTransportState & | transport, | ||
| SurfaceStateData & | surface, | ||
| double | coordinate_scale ) |
Resolve channel geometry onto shared porous thermal columns and bind borrowed owners.
Resolve shared finite channel/soil contacts and borrow their canonical owners.
| [in,out] | ctx | Prepared 1D context, spatial geometry, heat overrides and accessors. Clears heat_state.mesh_contact_link first; publishes the new link mask on success. |
| [in] | mesh | SI mesh geometry and cell topology, alive and stable for subsequent advances. |
| [in,out] | soil | Active porous-equilibrium ground heat owner. Selected cells gain surface_owned on successful binding, joining the shared finite thermal solve. |
| [in,out] | transport | Prepared matching groundwater species layout and physical porewater view. |
| [in,out] | surface | Prepared surface state and heat owner used by later advances. |
| [in] | coordinate_scale | Finite positive multiplier converting context XY coordinates to m. Header calls this coordinate_to_si; 1D hydraulic elevations are separately converted from feet. |
| std::string openswmm::twoD::ChannelGroundState::modelIdentity | ( | ) | const |
Serialize the prepared ownership, contact geometry and transport row identity.
|
inlinenoexcept |
Test the resolved thermal contact ownership mask for one cell.
| [in] | i | Zero-based cell index; negative/out-of-range returns false. |
|
inlinenoexcept |
Test the resolved thermal contact ownership mask for one link.
| [in] | i | Zero-based link index; negative/out-of-range returns false. |