6#include "LayerData.hpp"
7#include "Simulation_Time.hpp"
8#include "State_Exception.hpp"
9#include "geojson/FeatureBuilder.hpp"
10#include <boost/core/span.hpp>
16 class HY_Features_MPI;
36 const std::vector<std::string>& p_u,
41 std::shared_ptr<utils::CatchmentOutputsMgr> cat_output_mgr) :
67 std::shared_ptr<utils::CatchmentOutputsMgr> cat_output_mgr) :
114 virtual void update_models(boost::span<double> catchment_outflows,
115 std::unordered_map<std::string, int>
const& catchment_indexes,
116 boost::span<double> nexus_downstream_flows,
117 std::unordered_map<std::string, int>
const& nexus_indexes,
Simulation Time class providing time-series variables and methods to the model.
Definition Simulation_Time.hpp:48
time_t next_timestep_epoch_time(int epoch_time_seconds) const
Definition Simulation_Time.hpp:139
time_t get_current_epoch_time() const
Accessor to the the current simulation time.
Definition Simulation_Time.hpp:100
Collection interface to HY_Features objects and their associated model formulations.
Definition HY_Features.hpp:46
const double get_time_step() const
Return this time_step interval used for this layer.
Definition Layer.hpp:104
virtual void update_models(boost::span< double > catchment_outflows, std::unordered_map< std::string, int > const &catchment_indexes, boost::span< double > nexus_downstream_flows, std::unordered_map< std::string, int > const &nexus_indexes, int current_step)
Run one simulation timestep for each model in this layer.
Definition Layer.cpp:15
time_t current_timestep_epoch_time()
Return the last timestep that was processed by this layer in epoch time units.
Definition Layer.hpp:88
long output_time_index
Definition Layer.hpp:130
feature_type & features
Definition Layer.hpp:127
const std::string & get_time_step_units() const
Return the units for the time_step value of this layer.
Definition Layer.hpp:109
std::shared_ptr< utils::CatchmentOutputsMgr > catchment_output_mgr
Catchment output sink for this layer's per-timestep push; null when output is disabled.
Definition Layer.hpp:132
const geojson::GeoJSON catchment_data
Definition Layer.hpp:129
const std::vector< std::string > processing_units
Definition Layer.hpp:125
const LayerDescription description
Definition Layer.hpp:122
Layer(const LayerDescription &desc, const Simulation_Time &s_t, feature_type &f, long idx, std::shared_ptr< utils::CatchmentOutputsMgr > cat_output_mgr)
Construct a minimum layer object.
Definition Layer.hpp:62
Layer(const LayerDescription &desc, const std::vector< std::string > &p_u, const Simulation_Time &s_t, feature_type &f, geojson::GeoJSON cd, long idx, std::shared_ptr< utils::CatchmentOutputsMgr > cat_output_mgr)
Definition Layer.hpp:34
Simulation_Time simulation_time
Definition Layer.hpp:126
time_t next_timestep_epoch_time()
Return the next timestep that will be processed by this layer in epoch time units.
Definition Layer.hpp:82
int get_id() const
Return the numeric id of this layer.
Definition Layer.hpp:94
const std::string & get_name() const
Return the name of this layer.
Definition Layer.hpp:99
Abstract class for managing and writing to catchment data files.
Definition CatchmentOutputsMgr.hpp:48
std::shared_ptr< FeatureCollection > GeoJSON
Easy short-hand for a smart pointer to a FeatureCollection.
Definition FeatureBuilder.hpp:21
HY_HydroLocation: class representing a hydrologic position.
Definition HY_Features.hpp:17
Definition DomainLayer.hpp:13
A simple structure to hold meta data related to a computational layer.
Definition LayerData.hpp:18
std::string time_step_units
Definition LayerData.hpp:20
double time_step
Definition LayerData.hpp:22
std::string name
Definition LayerData.hpp:19
int id
Definition LayerData.hpp:21