|
NGen
|
#include <protocols.hpp>
Collaboration diagram for models::bmi::protocols::NgenBmiProtocols:Public Member Functions | |
| NgenBmiProtocols () | |
| Container and management interface for BMI protocols for use in ngen. | |
| NgenBmiProtocols (std::shared_ptr< models::bmi::Bmi_Adapter > model, const geojson::PropertyMap &properties) | |
| Construct a new Ngen Bmi Protocols object for use with a known model. | |
| auto | run (const Protocol &protocol_name, const Context &ctx) const -> expected< void, ProtocolError > |
| Run a specific BMI protocol by name with a given context. | |
Private Attributes | |
| std::shared_ptr< models::bmi::Bmi_Adapter > | model |
| All protocols managed by this container will utilize the same model. | |
| std::unordered_map< Protocol, std::unique_ptr< NgenBmiProtocol > > | protocols |
| Map of protocol name to protocol instance. | |
| models::bmi::protocols::NgenBmiProtocols::NgenBmiProtocols | ( | ) |
Container and management interface for BMI protocols for use in ngen.
Construct a new Ngen Bmi Protocols object with a null model
References models::bmi::protocols::MASS_BALANCE, and protocols.
| models::bmi::protocols::NgenBmiProtocols::NgenBmiProtocols | ( | std::shared_ptr< models::bmi::Bmi_Adapter > | model, |
| const geojson::PropertyMap & | properties ) |
Construct a new Ngen Bmi Protocols object for use with a known model.
| model | An initialized BMI model |
| properties | Properties for each protocol being initialized |
References models::bmi::protocols::MASS_BALANCE, model, and protocols.
| auto models::bmi::protocols::NgenBmiProtocols::run | ( | const Protocol & | protocol_name, |
| const Context & | ctx ) const -> expected<void, ProtocolError> |
Run a specific BMI protocol by name with a given context.
| protocol_name | The name of the protocol to run |
| ctx | The context of the current protocol run |
References models::bmi::protocols::NgenBmiProtocol::error_or_warning(), models::bmi::protocols::MASS_BALANCE, and models::bmi::protocols::UNSUPPORTED_PROTOCOL.
Referenced by realization::Bmi_Module_Formulation::check_mass_balance().
|
private |
All protocols managed by this container will utilize the same model.
This reduces the amount of pointer copying and references across a large simulation and it ensures that all protocols see the same model state.
Referenced by NgenBmiProtocols().
|
private |
Map of protocol name to protocol instance.
Referenced by NgenBmiProtocols(), and NgenBmiProtocols().