20#include "pism/stressbalance/WeertmanSliding.hh"
22#include "pism/rheology/FlowLawFactory.hh"
23#include "pism/geometry/Geometry.hh"
24#include "pism/stressbalance/StressBalance.hh"
25#include "pism/util/Logger.hh"
28namespace stressbalance {
35 m_config->get_number(
"stress_balance.sia.Glen_exponent"));
39 m_log->message(2,
"* Initializing Weertman-style basal sliding...\n");
86 double A_s =
m_config->get_number(
"stress_balance.weertman_sliding.A",
"Pa-3 s-1 m-2");
87 double k =
m_config->get_number(
"stress_balance.weertman_sliding.k");
93 for (
auto p :
m_grid->points()) {
94 const int i = p.i(), j = p.j();
97 P_o =
m_EC->pressure(H(i, j)),
100 if (not
m_EC->is_temperate(E_base, P_o) or cell_type.ocean(i, j)) {
106 Vector2d grad_h = {diff_x_p(h, i, j), diff_y_p(h, i, j)};
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
std::shared_ptr< const Logger > m_log
logger (for easy access)
array::Scalar2 ice_surface_elevation
array::CellType2 cell_type
array::Scalar2 ice_thickness
void failed()
Indicates a failure of a parallel section.
double magnitude() const
Magnitude.
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
double * get_column(int i, int j)
A virtual class collecting methods common to ice and bedrock 3D fields.
std::shared_ptr< FlowLaw > create(const std::string &type_name, double exponent)
std::shared_ptr< rheology::FlowLaw > m_flow_law
std::shared_ptr< EnthalpyConverter > m_EC
array::Vector2 m_velocity
Shallow stress balance (such as the SSA).
WeertmanSliding(std::shared_ptr< const Grid > g)
virtual void update(const Inputs &inputs, bool full_update)