|
NGen
|
#include <NgenSimulation.hpp>
Collaboration diagram for NgenSimulation:Public Types | |
| using | hy_features_t = hy_features::HY_Features |
Public Member Functions | |
| NgenSimulation (Simulation_Time const &sim_time, std::vector< std::shared_ptr< ngen::Layer > > layers, std::unordered_map< std::string, int > catchment_indexes, std::unordered_map< std::string, int > nexus_indexes, int mpi_rank, int mpi_num_procs) | |
| NgenSimulation ()=delete | |
| ~NgenSimulation () | |
| void | run_catchments () |
| Run the catchment formulations for the full configured duration of the simulation. | |
| void | run_routing (std::string const &t_route_config_file_with_path) |
| Run t-route on nexus outflow values written to files during run_catchments() for the full configured duration of the simulation. | |
| void | run_routing_bmi (hy_features_t &features, std::string const &t_route_config_file_with_path) |
| Run t-route via BMI on the stored nexus outflow values for the full configured duration of the simulation. | |
| int | get_nexus_index (std::string const &nexus_id) const |
| double | get_nexus_outflow (int nexus_index, int timestep_index) const |
| size_t | get_num_output_times () const |
| std::string | get_timestamp_for_step (int step) const |
Private Member Functions | |
| void | advance_models_one_output_step () |
| template<class Archive > | |
| void | serialize (Archive &ar) |
Private Attributes | |
| int | simulation_step_ |
| std::shared_ptr< Simulation_Time > | sim_time_ |
| std::vector< std::shared_ptr< ngen::Layer > > | layers_ |
| std::unordered_map< std::string, int > | catchment_indexes_ |
| std::vector< double > | catchment_outflows_ |
| std::unordered_map< std::string, int > | nexus_indexes_ |
| std::vector< double > | nexus_downstream_flows_ |
| int | mpi_rank_ |
| int | mpi_num_procs_ |
| NgenSimulation::NgenSimulation | ( | Simulation_Time const & | sim_time, |
| std::vector< std::shared_ptr< ngen::Layer > > | layers, | ||
| std::unordered_map< std::string, int > | catchment_indexes, | ||
| std::unordered_map< std::string, int > | nexus_indexes, | ||
| int | mpi_rank, | ||
| int | mpi_num_procs ) |
References catchment_indexes_, catchment_outflows_, get_num_output_times(), nexus_downstream_flows_, and nexus_indexes_.
|
delete |
|
default |
|
private |
References catchment_indexes_, catchment_outflows_, layers_, Simulation_Time::next_timestep_epoch_time(), nexus_downstream_flows_, nexus_indexes_, sim_time_, and simulation_step_.
Referenced by run_catchments().
| int NgenSimulation::get_nexus_index | ( | std::string const & | nexus_id | ) | const |
References nexus_indexes_.
| double NgenSimulation::get_nexus_outflow | ( | int | nexus_index, |
| int | timestep_index ) const |
References nexus_downstream_flows_, and nexus_indexes_.
| size_t NgenSimulation::get_num_output_times | ( | ) | const |
References Simulation_Time::get_total_output_times(), and sim_time_.
Referenced by NgenSimulation(), and run_catchments().
| std::string NgenSimulation::get_timestamp_for_step | ( | int | step | ) | const |
References Simulation_Time::get_timestamp(), and sim_time_.
| void NgenSimulation::run_catchments | ( | ) |
Run the catchment formulations for the full configured duration of the simulation.
Can be configured to capture calculated runoff values in catchment_outflows_ and nexus_downstream_flows_ for subsequent output and consumption by run_routing_bmi()
References advance_models_one_output_step(), Simulation_Time::advance_timestep(), catchment_indexes_, catchment_outflows_, get_num_output_times(), nexus_downstream_flows_, nexus_indexes_, sim_time_, and simulation_step_.
| void NgenSimulation::run_routing | ( | std::string const & | t_route_config_file_with_path | ) |
Run t-route on nexus outflow values written to files during run_catchments() for the full configured duration of the simulation.
References Simulation_Time::get_output_interval_seconds(), Simulation_Time::get_total_output_times(), mpi_rank_, and sim_time_.
| void NgenSimulation::run_routing_bmi | ( | NgenSimulation::hy_features_t & | features, |
| std::string const & | t_route_config_file_with_path ) |
Run t-route via BMI on the stored nexus outflow values for the full configured duration of the simulation.
References Simulation_Time::get_total_output_times(), mpi_num_procs_, mpi_rank_, nexus_downstream_flows_, nexus_indexes_, hy_features::identifiers::separator, and sim_time_.
|
private |
References catchment_indexes_, catchment_outflows_, nexus_downstream_flows_, nexus_indexes_, sim_time_, and simulation_step_.
|
private |
Referenced by NgenSimulation(), advance_models_one_output_step(), run_catchments(), and serialize().
|
private |
Referenced by NgenSimulation(), advance_models_one_output_step(), run_catchments(), and serialize().
|
private |
Referenced by advance_models_one_output_step().
|
private |
Referenced by run_routing_bmi().
|
private |
Referenced by run_routing(), and run_routing_bmi().
|
private |
Referenced by NgenSimulation(), advance_models_one_output_step(), get_nexus_outflow(), run_catchments(), run_routing_bmi(), and serialize().
|
private |
|
private |
|
private |
Referenced by advance_models_one_output_step(), run_catchments(), and serialize().