19 #ifndef __flowlaw_factory
20 #define __flowlaw_factory
26 #include "pism/rheology/FlowLaw.hh"
27 #include "pism/util/ConfigInterface.hh"
32 #define ICE_ISOTHERMAL_GLEN "isothermal_glen"
34 #define ICE_GPBLD "gpbld"
35 #define ICE_HOOKE "hooke"
37 #define ICE_GOLDSBY_KOHLSTEDT "gk"
38 #define ICE_ARRWARM "arrwarm"
40 typedef FlowLaw*(*FlowLawCreator)(
const std::string &,
51 void remove(
const std::string &name);
52 std::shared_ptr<FlowLaw>
create();
std::shared_ptr< const Config > ConstPtr
A class for storing and accessing PISM configuration flags and parameters.
std::shared_ptr< EnthalpyConverter > Ptr
std::map< std::string, FlowLawCreator > m_flow_laws
~FlowLawFactory()=default
std::shared_ptr< FlowLaw > create()
void remove(const std::string &name)
const Config::ConstPtr m_config
FlowLawFactory(const std::string &prefix, Config::ConstPtr conf, EnthalpyConverter::Ptr my_EC)
EnthalpyConverter::Ptr m_EC
void set_default(const std::string &name)
void add(const std::string &name, FlowLawCreator)
FlowLaw *(* FlowLawCreator)(const std::string &, const Config &, EnthalpyConverter::Ptr)