20 #include "pism/stressbalance/WeertmanSliding.hh"
22 #include "pism/rheology/FlowLawFactory.hh"
23 #include "pism/geometry/Geometry.hh"
24 #include "pism/stressbalance/StressBalance.hh"
27 namespace stressbalance {
37 m_log->message(2,
"* Initializing Weertman-style basal sliding...\n");
84 double A_s =
m_config->get_number(
"stress_balance.weertman_sliding.A",
"Pa-3 s-1 m-2");
85 double k =
m_config->get_number(
"stress_balance.weertman_sliding.k");
91 for (
auto p =
m_grid->points(); p; p.next()) {
92 const int i = p.i(), j = p.j();
95 P_o =
m_EC->pressure(H(i, j)),
98 if (not
m_EC->is_temperate(E_base, P_o) or cell_type.ocean(i, j)) {
const Config::ConstPtr m_config
configuration database used by this component
const Logger::ConstPtr m_log
logger (for easy access)
const std::shared_ptr< const Grid > m_grid
grid used by this component
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()
std::shared_ptr< rheology::FlowLaw > m_flow_law
EnthalpyConverter::Ptr 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)
double diff_x_p(const array::Scalar &array, int i, int j)
Returns the x-derivative at i,j approximated using centered finite differences. Respects grid periodi...
double diff_y_p(const array::Scalar &array, int i, int j)
Returns the y-derivative at i,j approximated using centered finite differences. Respects grid periodi...