OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
SnowCheckpoint.cpp File Reference

Checkpoint persistence for snow model state. More...

#include "SnowCheckpoint.hpp"
#include "MeshSnow.hpp"
#include "DegreeDaySnow.hpp"
#include "../../core/CompletedSourceArchive.hpp"
#include "../../core/SimulationContext.hpp"
#include "../../core/UnitConversion.hpp"
#include <cmath>
#include <stdexcept>
Include dependency graph for SnowCheckpoint.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::surface
 

Functions

std::array< double, 4 > openswmm::surface::snowRuntimeForcing (const SimulationContext &context)
 Read the small runtime override key used to invalidate held predictions.
 
bool openswmm::surface::snowTransientForcing (const SimulationContext &context)
 Test whether temperature or wind has a transient active runtime override.
 
std::string openswmm::surface::snowModelIdentity (const SimulationContext &context, const snow::SnowSoA &snow)
 Encode the native snow restart compatibility identity.
 
std::string openswmm::surface::snowForcingIdentity (const SimulationContext &context)
 Encode configuration and actual weather values controlling held snow predictions.
 
void openswmm::surface::archiveHeldSnow (detail::CompletedSourceArchive &archive, ueb::HeldState &held)
 Stream and validate accepted/predicted lumped UEB history and consumption clocks.
 
void openswmm::surface::archiveDegreeDaySnow (detail::CompletedSourceArchive &archive, snow::SnowSoA &snow)
 Stream fixed-layout native degree-day dynamic state and shared report histories.
 
std::string openswmm::surface::saveSnowCheckpoint (const SimulationContext &context, const snow::SnowSoA &snow)
 Encode native degree-day and UEB accepted/held snow state without owner mutation.
 
std::string openswmm::surface::restoreSnowCheckpoint (SimulationContext &context, snow::SnowSoA &snow, const std::string &bytes, bool apply=true, bool seed=false)
 Decode native snow into a compatible model, optionally as a new hot start.
 
std::string openswmm::surface::saveCombinedSnowCheckpoint (const SimulationContext &context, const snow::SnowSoA &snow, const MeshSnow *mesh)
 Encode native snow and, when active, the paired mesh snow owner.
 
std::string openswmm::surface::restoreCombinedSnowCheckpoint (SimulationContext &context, snow::SnowSoA &snow, MeshSnow *mesh, const std::string &bytes, bool apply, bool seed)
 Validate native and mesh snow together before ordinary publication.
 

Detailed Description

Checkpoint persistence for snow model state.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0