22#include "pism/rheology/FlowLawFactory.hh"
23#include "pism/util/Config.hh"
24#include "pism/util/error_handling.hh"
26#include "pism/rheology/IsothermalGlen.hh"
27#include "pism/rheology/PatersonBudd.hh"
28#include "pism/rheology/GPBLD.hh"
29#include "pism/rheology/Hooke.hh"
30#include "pism/rheology/PatersonBuddCold.hh"
31#include "pism/rheology/PatersonBuddWarm.hh"
32#include "pism/rheology/GoldsbyKohlstedt.hh"
37using ECPtr = std::shared_ptr<EnthalpyConverter>;
48 return new (
GPBLD)(exponent, config, EC);
52 return new (
Hooke)(exponent, config, EC);
68 std::shared_ptr<EnthalpyConverter> EC)
69 : m_config(conf), m_EC(EC) {
98 return std::shared_ptr<FlowLaw>((*r)(exponent, *
m_config,
m_EC));
#define ICE_GOLDSBY_KOHLSTEDT
#define ICE_ISOTHERMAL_GLEN
A class for storing and accessing PISM configuration flags and parameters.
static RuntimeError formatted(const ErrorLocation &location, const char format[],...) __attribute__((format(printf
build a RuntimeError with a formatted message
std::shared_ptr< const Config > m_config
std::map< std::string, FlowLawCreator > m_flow_laws
void remove(const std::string &name)
std::shared_ptr< FlowLaw > create(const std::string &type_name, double exponent)
FlowLawFactory(std::shared_ptr< const Config > conf, std::shared_ptr< EnthalpyConverter > my_EC)
std::shared_ptr< EnthalpyConverter > m_EC
void add(const std::string &name, FlowLawCreator)
Glen (1955) and Paterson-Budd (1982) flow law with additional water fraction factor from Lliboutry & ...
A hybrid of Goldsby-Kohlstedt (2001) ice (constitutive form) and Paterson-Budd (1982)-Glen (viscosity...
Isothermal Glen ice allowing extra customization.
Cold case of Paterson-Budd.
Warm case of Paterson-Budd.
Derived class of FlowLaw for Paterson-Budd (1982)-Glen ice.
#define PISM_ERROR_LOCATION
FlowLaw * create_hooke(double exponent, const Config &config, ECPtr EC)
std::shared_ptr< EnthalpyConverter > ECPtr
FlowLaw *(* FlowLawCreator)(double, const Config &, std::shared_ptr< EnthalpyConverter >)
FlowLaw * create_isothermal_glen(double exponent, const Config &config, ECPtr EC)
FlowLaw * create_goldsby_kohlstedt(double exponent, const Config &config, ECPtr EC)
FlowLaw * create_arrwarm(double exponent, const Config &config, ECPtr EC)
FlowLaw * create_arr(double exponent, const Config &config, ECPtr EC)
FlowLaw * create_pb(double exponent, const Config &config, ECPtr EC)
FlowLaw * create_gpbld(double exponent, const Config &config, ECPtr EC)