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/Config.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"
52 std::shared_ptr<EnthalpyConverter> EC,
int test)
98 double n =
m_config->get_number(
"stress_balance.sia.Glen_exponent");
109 ice_density =
m_config->get_number(
"constants.ice.density"),
115 for (
auto p :
m_grid->points()) {
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");
180 double n =
m_config->get_number(
"stress_balance.sia.Glen_exponent");
193 for (
auto p :
m_grid->points()) {
194 const int i = p.i(), j = p.j();
217 (*m_mass_flux)(i, j) = accum;
232 for (
auto p :
m_grid->points()) {
233 const int i = p.i(), j = p.j();
238 (*m_temperature)(i, j) =
Tmin +
ST * r;
const units::System::Ptr m_sys
unit system used by this component
const Time & time() const
std::shared_ptr< const Config > m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
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
virtual std::set< VariableMetadata > state_impl() const
MaxTimestep max_timestep_impl(double t) const
void update_ABCDH(double t)
static const double ApforG
Verification(std::shared_ptr< const Grid > g, std::shared_ptr< EnthalpyConverter > EC, int test)
void update_impl(const Geometry &geometry, double t, double dt)
void write_state_impl(const OutputFile &output) const
The default (empty implementation).
void init_impl(const Geometry &geometry)
static const double LforFG
std::shared_ptr< EnthalpyConverter > m_EC
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)
std::set< VariableMetadata > metadata(std::initializer_list< const Array * > vecs)
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)