NGen
|
#include <DomainLayer.hpp>
Public Types | |
using | feature_type = hy_features::HY_Features |
Public Member Functions | |
DomainLayer ()=delete | |
DomainLayer (const LayerDescription &desc, const Simulation_Time &s_t, feature_type &features, long idx, std::shared_ptr< realization::Catchment_Formulation > formulation) | |
Construct a new Domain Layer object. | |
void | update_models () override |
Run one simulation timestep for this model associated with the domain. | |
time_t | next_timestep_epoch_time () |
Return the next timestep that will be processed by this layer in epoch time units. | |
time_t | current_timestep_epoch_time () |
Return the last timestep that was processed by this layer in epoch time units. | |
int | get_id () const |
Return the numeric id of this layer. | |
const std::string & | get_name () const |
Return the name of this layer. | |
const double | get_time_step () const |
Return this time_step interval used for this layer. | |
const std::string & | get_time_step_units () const |
Return the units for the time_step value of this layer. | |
Protected Attributes | |
const LayerDescription | description |
const std::vector< std::string > | processing_units |
Simulation_Time | simulation_time |
feature_type & | features |
const geojson::GeoJSON | catchment_data |
long | output_time_index |
Private Attributes | |
std::shared_ptr< realization::Catchment_Formulation > | formulation |
|
inherited |
|
delete |
|
inline |
Construct a new Domain Layer object.
Unlike HY_Features types, the feature relationship with a DomainLayer is indirect. The features
collection defines features associated (e.g. overlapping) with the Domain. The domain must be further queried in order to provide specific information at a particular feature, e.g. a catchment which this domain overlaps with, or a nexus location the domain may contribute to directly/indirectly via the catchment.
A domain layer associated with a set of catchment features will need to have outputs of the domain resampled/aggregated to the catchment.
Currently unsupported, but a future extension of the DomainLayer is interactions beetween two or more generic DomainLayers, perhaps each with its own internal grid, and resampling between the layers would be required similarly to resampling from a DomainLayer to the HY_Features catchment domain.
desc | LayerDescription for the domain layer |
s_t | Simulation_Time object associated with the domain layer |
features | collection of HY_Features associated with the domain |
idx | index of the layer |
formulation | Formulation associated with the domain |
References formulation, realization::Catchment_Formulation::get_output_header_line(), and HY_CatchmentArea::write_output().
|
inlineinherited |
Return the last timestep that was processed by this layer in epoch time units.
References Simulation_Time::get_current_epoch_time(), and ngen::Layer::simulation_time.
|
inlineinherited |
Return the numeric id of this layer.
References ngen::Layer::description, and ngen::LayerDescription::id.
|
inlineinherited |
Return the name of this layer.
References ngen::Layer::description, and ngen::LayerDescription::name.
|
inlineinherited |
Return this time_step interval used for this layer.
References ngen::Layer::description, and ngen::LayerDescription::time_step.
|
inlineinherited |
Return the units for the time_step value of this layer.
References ngen::Layer::description, and ngen::LayerDescription::time_step_units.
|
inlineinherited |
Return the next timestep that will be processed by this layer in epoch time units.
References Simulation_Time::next_timestep_epoch_time(), and ngen::Layer::simulation_time.
|
inlineoverridevirtual |
Run one simulation timestep for this model associated with the domain.
A domain layer update simply advances the attached domain formulation(s) in time and records the BMI accessible outputs of the domain formulation. Since this is NOT a HY_Features concept/class, it doesn't directly associate with HY_Features types (e.g. catchments, nexus, ect)
Any required connection to other components, e.g. providing inputs to a catchment feature, is not yet implemented in this class.
Reimplemented from ngen::Layer.
References Simulation_Time::advance_timestep(), ngen::Layer::description, formulation, Simulation_Time::get_output_interval_seconds(), realization::Catchment_Formulation::get_output_line_for_timestep(), realization::Catchment_Formulation::get_response(), Simulation_Time::get_timestamp(), Simulation_Time::get_total_output_times(), ngen::LayerDescription::id, ngen::LayerDescription::name, ngen::Layer::output_time_index, ngen::Layer::simulation_time, models::external::State_Exception::what(), and HY_CatchmentArea::write_output().
|
protectedinherited |
Referenced by ngen::Layer::update_models().
|
protectedinherited |
|
protectedinherited |
Referenced by ngen::Layer::update_models(), and ngen::SurfaceLayer::update_models().
|
private |
Referenced by DomainLayer(), and update_models().
|
protectedinherited |
Referenced by update_models(), ngen::Layer::update_models(), and ngen::SurfaceLayer::update_models().
|
protectedinherited |
Referenced by ngen::Layer::update_models().
|
protectedinherited |