![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Rain gage processing — numerically identical to legacy gage.c. More...
#include "Gage.hpp"#include "../core/SimulationContext.hpp"#include "../core/UnitConversion.hpp"#include "../core/DateTime.hpp"#include "../2d/data/MeshData.hpp"#include "../2d/data/SolverOptions2D.hpp"#include <cmath>#include <algorithm>#include <cstdio>Namespaces | |
| namespace | openswmm |
| namespace | openswmm::gage |
| Rain records, accepted runoff-clock state and read-only report lookups. Context routines require aligned initialized gage/subcatchment arrays, valid project units and ordered finite table x/y pairs unless stated otherwise. State mutations are immediate; serialize updates with reads and use private copies for trials. Only precipitation splits convert rates to internal ft/s. | |
Functions | |
| double | openswmm::gage::convertRainfall (double raw_value, GageState &state) |
| Transform one raw rain record with standalone GageState factors. | |
| PrecipSplit | openswmm::gage::splitPrecip (const SimulationContext &ctx, std::size_t sub) |
| Split a subcatchment's current gage intensity into internal rain and snow. | |
| void | openswmm::gage::updatePastRain (GageState &state, int time_step) |
| Accumulate a standalone gage's held intensity into completed-hour history. | |
| void | openswmm::gage::updatePastRain (SimulationContext &ctx, int time_step) |
| Accumulate every gage's current held rate over one accepted runoff step. | |
| double | openswmm::gage::getPastRain (const GageState &state, int hours) |
| Sum completed hourly depth buckets, excluding the current partial hour. | |
| const Table * | openswmm::gage::gageRainSeries (const SimulationContext &ctx, int gage_idx) |
| Borrow the actual resolved source table for a gage. | |
| int | openswmm::gage::gageSeriesRainType (const SimulationContext &ctx, int gage_idx) |
| Select the transform appropriate to resolved source storage. | |
| double | openswmm::gage::gageUnitsFactor (const SimulationContext &ctx, int gage_idx) |
| Return the source-storage-to-project rainfall depth multiplier. | |
| double | openswmm::gage::convertGageValue (double raw, int rain_type, double interval_sec, double &cumul_accum, double units_factor, double scale_factor) |
| Transform one source record and apply units then scale factors. | |
| bool | openswmm::gage::gageIsUsed (const SimulationContext &ctx, int gage_idx) |
| Test whether the model or enabled rainfall mesh consumes a gage. | |
| double | openswmm::gage::gageNextRainDate (const SimulationContext &ctx, int gage_idx, double t) |
| Read the next runoff-clock rainfall boundary from cached gage state. | |
| double | openswmm::gage::gageNextRateChange (const SimulationContext &ctx, int gage_idx, double date, double limit) |
| Forecast the end of the current held rain rate without changing source state. | |
| void | openswmm::gage::updateAllGages (SimulationContext &ctx, double current_time) |
| Advance used gage record state and publish current effective rainfall. | |
| double | openswmm::gage::getReportRainfall (const SimulationContext &ctx, int gage_idx, double report_date) |
| Query rainfall using the most recently advanced runoff-gage state. | |
| double | openswmm::gage::getReportRainfallFromSeries (const SimulationContext &ctx, int gage_idx, double report_date) |
| Query report-time source records independently of a later runoff cursor. | |
Rain gage processing — numerically identical to legacy gage.c.