NGen
Loading...
Searching...
No Matches
realization Namespace Reference

Namespaces

namespace  config
 

Classes

class  Bmi_C_Formulation
 
class  Bmi_Cpp_Formulation
 Encapsulates a bmi::Bmi model in C++ such that it can be loaded as a formulation, as such also so that it can be dynamically loaded from a shared library file. More...
 
class  Bmi_Formulation
 Abstraction of formulation with backing model object(s) that implements the BMI. More...
 
class  Bmi_Module_Formulation
 Abstraction of a formulation with a single backing model object that implements the BMI. More...
 
class  Bmi_Multi_Formulation
 Abstraction of a formulation with multiple backing model object that implements the BMI. More...
 
class  Catchment_Formulation
 
class  ConfigurationException
 Custom exception indicating a problem when integrating with the provided realization configuration. More...
 
class  Formulation
 
class  Formulation_Manager
 

Typedefs

using constructor = std::shared_ptr<Catchment_Formulation> (*)(std::string, std::shared_ptr<data_access::GenericDataProvider>, utils::StreamHandler)
 

Functions

static std::string valid_formulation_keys ()
 
static bool formulation_exists (std::string formulation_type)
 
static std::shared_ptr< Catchment_Formulationconstruct_formulation (std::string formulation_type, std::string identifier, forcing_params &forcing_config, utils::StreamHandler output_stream)
 
static std::string get_formulation_key (const boost::property_tree::ptree &tree)
 
static bool is_var_name_in_collection (const std::vector< std::string > &all_names, const std::string &var_name)
 
template<typename T , typename Iterator >
std::shared_ptr< T > as_c_array (Iterator begin, Iterator end)
 Template function for copying iterator range into contiguous array.
 
template<typename Iterator >
std::shared_ptr< void > get_values_as_type (std::string type, Iterator begin, Iterator end)
 Gets values in iterator range, casted based on type then returned as typeless (void) pointer.
 
template<typename T >
std::shared_ptr< void > get_value_as_type (std::string type, T value)
 
template<class T >
static constructor create_formulation_constructor ()
 

Variables

std::map< std::string, constructorformulations
 

Typedef Documentation

◆ constructor

using realization::constructor = std::shared_ptr<Catchment_Formulation> (*)(std::string, std::shared_ptr<data_access::GenericDataProvider>, utils::StreamHandler)

Function Documentation

◆ as_c_array()

template<typename T , typename Iterator >
std::shared_ptr< T > realization::as_c_array ( Iterator begin,
Iterator end )

Template function for copying iterator range into contiguous array.

This function will iterate the range and cast the iterator value to type T and copy that value into a C-like array of contiguous, dynamically allocated memory. This array is stored in a smart pointer with a custom array deleter.

Template Parameters
T
Iterator
Parameters
begin
end
Returns
std::shared_ptr<T>

Referenced by get_values_as_type().

◆ construct_formulation()

static std::shared_ptr< Catchment_Formulation > realization::construct_formulation ( std::string formulation_type,
std::string identifier,
forcing_params & forcing_config,
utils::StreamHandler output_stream )
static

◆ create_formulation_constructor()

template<class T >
static constructor realization::create_formulation_constructor ( )
static

◆ formulation_exists()

static bool realization::formulation_exists ( std::string formulation_type)
static

◆ get_formulation_key()

static std::string realization::get_formulation_key ( const boost::property_tree::ptree & tree)
static

References formulation_exists().

◆ get_value_as_type()

template<typename T >
std::shared_ptr< void > realization::get_value_as_type ( std::string type,
T value )

◆ get_values_as_type()

template<typename Iterator >
std::shared_ptr< void > realization::get_values_as_type ( std::string type,
Iterator begin,
Iterator end )

Gets values in iterator range, casted based on type then returned as typeless (void) pointer.

Template Parameters
Iterator
Parameters
type
begin
end
Returns
std::shared_ptr<void>

References as_c_array().

Referenced by realization::Bmi_Module_Formulation::set_initial_bmi_parameters(), and realization::Bmi_Module_Formulation::set_model_inputs_prior_to_update().

◆ is_var_name_in_collection()

static bool realization::is_var_name_in_collection ( const std::vector< std::string > & all_names,
const std::string & var_name )
static

◆ valid_formulation_keys()

static std::string realization::valid_formulation_keys ( )
static

Variable Documentation

◆ formulations

std::map< std::string, constructor > realization::formulations
Initial value:
= {
{"bmi_c++", create_formulation_constructor<Bmi_Cpp_Formulation>()},
{"bmi_multi", create_formulation_constructor<Bmi_Multi_Formulation>()},
}

Referenced by construct_formulation(), formulation_exists(), and valid_formulation_keys().