23 #include "pism/verification/PSVerification.hh"
24 #include "pism/coupler/AtmosphereModel.hh"
25 #include "pism/rheology/PatersonBuddCold.hh"
26 #include "pism/util/EnthalpyConverter.hh"
27 #include "pism/util/Time.hh"
28 #include "pism/util/ConfigInterface.hh"
30 #include "pism/verification/tests/exactTestsABCD.h"
31 #include "pism/verification/tests/exactTestsFG.hh"
32 #include "pism/verification/tests/exactTestH.h"
33 #include "pism/verification/tests/exactTestL.hh"
35 #include "pism/util/error_handling.hh"
36 #include "pism/util/Grid.hh"
37 #include "pism/util/MaxTimestep.hh"
38 #include "pism/util/Context.hh"
109 ice_density =
m_config->get_number(
"constants.ice.density"),
115 for (
auto p =
m_grid->points(); p; p.next()) {
116 const int i = p.i(), j = p.j();
119 (*m_mass_flux)(i, j) = a0 * (1.0 - (2.0 * r * r / Lsqr));
121 (*m_mass_flux)(i, j) *= ice_density;
176 double A0, T0, accum;
178 double f =
m_config->get_number(
"constants.ice.density") /
m_config->get_number(
"bed_deformation.mantle_density");
192 for (
auto p =
m_grid->points(); p; p.next()) {
193 const int i = p.i(), j = p.j();
216 (*m_mass_flux)(i, j) = accum;
231 for (
auto p =
m_grid->points(); p; p.next()) {
232 const int i = p.i(), j = p.j();
237 (*m_temperature)(i, j) =
Tmin +
ST * r;
const units::System::Ptr m_sys
unit system used by this component
const Time & time() const
const Config::ConstPtr m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
std::shared_ptr< EnthalpyConverter > Ptr
High-level PISM I/O class.
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
void failed()
Indicates a failure of a parallel section.
static RuntimeError formatted(const ErrorLocation &location, const char format[],...) __attribute__((format(printf
build a RuntimeError with a formatted message
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
double tempFromSoftness(double A) const
Return the temperature T corresponding to a given value A=A(T).
Cold case of Paterson-Budd.
void update(const Geometry &geometry, double t, double dt)
static const double ablationRateOutside
void write_model_state_impl(const File &output) const
The default (empty implementation).
MaxTimestep max_timestep_impl(double t) const
void update_ABCDH(double t)
static const double ApforG
Verification(std::shared_ptr< const Grid > g, EnthalpyConverter::Ptr EC, int test)
void update_impl(const Geometry &geometry, double t, double dt)
void init_impl(const Geometry &geometry)
static const double LforFG
EnthalpyConverter::Ptr m_EC
void define_model_state_impl(const File &output) const
The default (empty implementation).
static const double secpera
#define PISM_ERROR_LOCATION
struct TestHParameters exactH(const double f, const double t, const double r)
struct TestABCDParameters exactB(const double t, const double r)
struct TestABCDParameters exactD(const double t, const double r)
struct TestABCDParameters exactA(double r)
struct TestABCDParameters exactC(const double t, const double r)
double max(const array::Scalar &input)
Finds maximum over all the values in an array::Scalar object. Ignores ghosts.
double radius(const Grid &grid, int i, int j)
Returns the distance from the point (i,j) to the origin.
double convert(System::Ptr system, double input, const std::string &spec1, const std::string &spec2)
Convert a quantity from unit1 to unit2.
TestFGParameters exactFG(double t, double r, const std::vector< double > &z, double Cp)