OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::ForcingData::ElemClimateChannel Struct Reference

#include <ForcingData.hpp>

Collaboration diagram for openswmm::ForcingData::ElemClimateChannel:

Public Member Functions

void ensure (std::size_t n)
 Allocate a channel shape or preserve an already matching shape.
 
double apply (int i, double base) const noexcept
 Resolve an element override/addition against a supplied baseline.
 
void resetPerStep ()
 Disable only channel entries marked RESET.
 
void clear ()
 Release all owned element-climate channel arrays.
 

Public Attributes

std::vector< ForcingMode > mode
 
std::vector< double > value
 
std::vector< ForcingPersist > persist
 

Member Function Documentation

◆ apply()

double openswmm::ForcingData::ElemClimateChannel::apply ( int i,
double base ) const
inlinenoexcept

Resolve an element override/addition against a supplied baseline.

Caller aligns value/persist with mode; does not clamp, validate finite values or mutate climate state.

Parameters
[in]iElement index; negative or outside mode returns base.
[in]baseBroadcast value in this channel's units.
Returns
base for absent/NONE; value for OVERRIDE; base+value for any other non-NONE mode.

◆ clear()

void openswmm::ForcingData::ElemClimateChannel::clear ( )
inline

Release all owned element-climate channel arrays.

Restores an empty channel, invalidating borrowed elements; does not alter global climate forcing.

◆ ensure()

void openswmm::ForcingData::ElemClimateChannel::ensure ( std::size_t n)
inline

Allocate a channel shape or preserve an already matching shape.

If mode.size()==n returns without checking value/persist alignment. Otherwise replaces modes with NONE, values with zero, persistence RESET; allocation may interrupt the assignments.

Parameters
[in]nElement count for all three parallel arrays.

◆ resetPerStep()

void openswmm::ForcingData::ElemClimateChannel::resetPerStep ( )
inline

Disable only channel entries marked RESET.

Requires persist aligned with mode. Preserves values/persistence, dimensions and PERSIST entries.

Member Data Documentation

◆ mode

std::vector<ForcingMode> openswmm::ForcingData::ElemClimateChannel::mode

◆ persist

std::vector<ForcingPersist> openswmm::ForcingData::ElemClimateChannel::persist

◆ value

std::vector<double> openswmm::ForcingData::ElemClimateChannel::value

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