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

#include <GwSourceForcing.hpp>

Collaboration diagram for openswmm::twoD::GwSourceSignal:

Public Member Functions

const std::vector< double > & timePoints () const noexcept
 Borrow the signal's elapsed-second knot vector.
 
const std::vector< double > & ordinates () const noexcept
 Borrow ordinates associated with timePoints().
 
double at (double t) const noexcept
 Evaluate a constant or piecewise-linear signal with endpoint hold.
 

Public Attributes

double constant = 0.0
 
std::vector< double > times
 
std::vector< double > values
 
std::shared_ptr< const GwSourceSeries > series
 

Member Function Documentation

◆ at()

double openswmm::twoD::GwSourceSignal::at ( double t) const
inlinenoexcept

Evaluate a constant or piecewise-linear signal with endpoint hold.

Parameters
[in]tFinite elapsed simulation time s; may lie outside the knot range.
Returns
Constant when no time knots exist, otherwise linear interpolation in native signal units and first/last ordinate outside the range. Shared series takes precedence over inline data.
Note
Requires finite strictly increasing times and equally sized finite ordinates for a nonconstant signal. No shape/finite checks are made; NaN time is unsupported. Read-only, allocation-free and noexcept, with all referenced data stable for the call.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ordinates()

const std::vector< double > & openswmm::twoD::GwSourceSignal::ordinates ( ) const
inlinenoexcept

Borrow ordinates associated with timePoints().

Returns
Shared series values when series is present, otherwise inline values. A prepared nonconstant signal requires exactly one ordinate per knot. Units belong to the consuming flow, concentration, temperature or loading prescription. Lifetime follows the selected vector; no allocation or pointer retention occurs beyond the returned reference.
Here is the caller graph for this function:

◆ timePoints()

const std::vector< double > & openswmm::twoD::GwSourceSignal::timePoints ( ) const
inlinenoexcept

Borrow the signal's elapsed-second knot vector.

Returns
Shared immutable series times when series is present, otherwise inline times. Empty means constant forcing. Valid while the selected vector and this signal remain alive and are not reassigned; concurrent mutation is unsupported. The call neither copies nor allocates.
Here is the caller graph for this function:

Member Data Documentation

◆ constant

double openswmm::twoD::GwSourceSignal::constant = 0.0

◆ series

std::shared_ptr<const GwSourceSeries> openswmm::twoD::GwSourceSignal::series

◆ times

std::vector<double> openswmm::twoD::GwSourceSignal::times

◆ values

std::vector<double> openswmm::twoD::GwSourceSignal::values

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