#include <Catchment_Formulation.hpp>
|
| | Catchment_Formulation (std::string id, std::shared_ptr< data_access::GenericDataProvider > forcing) |
| |
| | Catchment_Formulation (std::string id) |
| |
| virtual std::vector< utils::OutputField > | get_output_fields () const =0 |
| | Get this formulation's output fields – name plus metadata (units, ...) – in the same order as the values returned by get_output_values_for_timestep.
|
| |
| virtual std::vector< double > | get_output_values_for_timestep (int timestep)=0 |
| | Get the output values for the given time step, positionally aligned with get_output_fields.
|
| |
| virtual double | get_response (time_step_t t_index, time_step_t t_delta) override=0 |
| | Execute the backing model formulation for the given time step, where it is of the specified size, and return the response output.
|
| |
| const std::vector< std::string > & | get_required_parameters () const override=0 |
| |
| void | create_formulation (boost::property_tree::ptree &config, geojson::PropertyMap *global=nullptr) override=0 |
| |
| void | create_formulation (geojson::PropertyMap properties) override=0 |
| |
| virtual | ~Catchment_Formulation ()=default |
| |
| void | finalize () |
| | Release resources of the given forcing provider.
|
| |
| virtual std::string | get_formulation_type () const =0 |
| |
| std::string | get_id () const |
| |
| virtual void | check_mass_balance (const int &iteration, const int &total_steps, const std::string ×tamp) const =0 |
| |
| virtual void | checkpoint_state (const int &iteration, const int &total_steps, const std::string ×tamp) const =0 |
| | Invoke the state-save side of the ngen BMI Serialization Protocol.
|
| |
|
| static void | config_pattern_substitution (geojson::PropertyMap &properties, const std::string &key, const std::string &pattern, const std::string &replacement) |
| | Perform in-place substitution on the given config property item, if the item and the pattern are present.
|
| |
◆ time_step_t
◆ Catchment_Formulation() [1/2]
◆ Catchment_Formulation() [2/2]
| realization::Catchment_Formulation::Catchment_Formulation |
( |
std::string | id | ) |
|
◆ ~Catchment_Formulation()
| virtual realization::Catchment_Formulation::~Catchment_Formulation |
( |
| ) |
|
|
virtualdefault |
◆ check_mass_balance()
| virtual void realization::Formulation::check_mass_balance |
( |
const int & | iteration, |
|
|
const int & | total_steps, |
|
|
const std::string & | timestamp ) const |
|
pure virtualinherited |
◆ checkpoint_state()
| virtual void realization::Formulation::checkpoint_state |
( |
const int & | iteration, |
|
|
const int & | total_steps, |
|
|
const std::string & | timestamp ) const |
|
pure virtualinherited |
Invoke the state-save side of the ngen BMI Serialization Protocol.
Called from the per-timestep driver (see core/Layer.cpp) alongside check_mass_balance. Implementations build a protocol Context from the arguments and the formulation's own compound identity, then forward to the NgenBmiProtocols container. Non-BMI formulations may implement as a no-op; unconfigured save protocols short-circuit inside run() so the cost is just the virtual dispatch.
Implemented in realization::Bmi_Module_Formulation, and realization::Bmi_Multi_Formulation.
◆ config_pattern_substitution()
| void realization::Catchment_Formulation::config_pattern_substitution |
( |
geojson::PropertyMap & | properties, |
|
|
const std::string & | key, |
|
|
const std::string & | pattern, |
|
|
const std::string & | replacement ) |
|
static |
◆ create_formulation() [1/2]
| void realization::Catchment_Formulation::create_formulation |
( |
boost::property_tree::ptree & | config, |
|
|
geojson::PropertyMap * | global = nullptr ) |
|
overridepure virtual |
◆ create_formulation() [2/2]
◆ finalize()
| void realization::Catchment_Formulation::finalize |
( |
| ) |
|
Release resources of the given forcing provider.
References forcing.
◆ get_catchment_id()
| const std::string & realization::Catchment_Formulation::get_catchment_id |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ get_formulation_type()
| virtual std::string realization::Formulation::get_formulation_type |
( |
| ) |
const |
|
pure virtualinherited |
◆ get_id()
| std::string realization::Formulation::get_id |
( |
| ) |
const |
|
inlineinherited |
◆ get_output_fields()
| virtual std::vector< utils::OutputField > realization::Catchment_Formulation::get_output_fields |
( |
| ) |
const |
|
pure virtual |
Get this formulation's output fields – name plus metadata (units, ...) – in the same order as the values returned by get_output_values_for_timestep.
The name is the output header field (configured, or defaulting to the output variable name); the units come from the same source that produces each value. So each field is positionally aligned with, and describes, the corresponding value.
- Returns
- The ordered output fields.
Implemented in realization::Bmi_Module_Formulation, and realization::Bmi_Multi_Formulation.
◆ get_output_values_for_timestep()
| virtual std::vector< double > realization::Catchment_Formulation::get_output_values_for_timestep |
( |
int | timestep | ) |
|
|
pure virtual |
◆ get_required_parameters()
| const std::vector< std::string > & realization::Catchment_Formulation::get_required_parameters |
( |
| ) |
const |
|
overridepure virtual |
◆ get_response()
Execute the backing model formulation for the given time step, where it is of the specified size, and return the response output.
Any inputs and additional parameters must be made available as instance members.
Types should clearly document the details of their particular response output.
- Parameters
-
| t_index | The index of the time step for which to run model calculations. |
| t_delta | The duration, in seconds, of the time step for which to run model calculations. |
- Returns
- The response output of the model for this time step.
Implements HY_CatchmentRealization.
Implemented in realization::Bmi_Module_Formulation, and realization::Bmi_Multi_Formulation.
Referenced by ngen::DomainLayer::update_models().
◆ interpret_parameters()
◆ set_catchment_id()
| void realization::Catchment_Formulation::set_catchment_id |
( |
std::string | cat_id | ) |
|
|
inlineoverrideprotectedvirtual |
◆ validate_parameters()
◆ bounds
| polygon_t HY_CatchmentArea::bounds |
|
protectedinherited |
◆ cat_id
| std::string realization::Catchment_Formulation::cat_id |
|
private |
◆ forcing
◆ id
| std::string realization::Formulation::id |
|
protectedinherited |
◆ id_number
| unsigned long HY_CatchmentRealization::id_number |
|
protectedinherited |
◆ realized_catchment
| std::shared_ptr<HY_Catchment> HY_CatchmentRealization::realized_catchment |
|
protectedinherited |
The documentation for this class was generated from the following files: