19 #include "pism/stressbalance/SSB_Modifier.hh"
20 #include "pism/rheology/FlowLawFactory.hh"
21 #include "pism/rheology/FlowLaw.hh"
22 #include "pism/util/Grid.hh"
23 #include "pism/util/ConfigInterface.hh"
24 #include "pism/stressbalance/StressBalance.hh"
25 #include "pism/util/array/Vector.hh"
26 #include "pism/util/Context.hh"
29 namespace stressbalance {
33 m_EC(
g->ctx()->enthalpy_converter()),
34 m_diffusive_flux(m_grid,
"diffusive_flux"),
35 m_u(m_grid,
"uvel", array::
WITH_GHOSTS, m_grid->z()),
36 m_v(m_grid,
"vvel", array::
WITH_GHOSTS, m_grid->z()) {
40 .
long_name(
"horizontal velocity of ice in the X direction")
46 .
long_name(
"horizontal velocity of ice in the Y direction")
52 .
long_name(
"diffusive (SIA) flux components on the staggered grid")
111 if (not full_update) {
118 for (
auto p =
m_grid->points(); p; p.next()) {
119 const int i = p.i(), j = p.j();
const Config::ConstPtr m_config
configuration database used by this component
const std::shared_ptr< const Grid > m_grid
grid used by this component
A class defining a common interface for most PISM sub-models.
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
void set_column(int i, int j, double c)
Set all values of scalar quantity to given a single value in a particular column.
A virtual class collecting methods common to ice and bedrock 3D fields.
void set(double c)
Result: v[j] <- c for all j.
void update_ghosts()
Updates ghost points.
SpatialVariableMetadata & metadata(unsigned int N=0)
Returns a reference to the SpatialVariableMetadata object containing metadata for the compoment N.
A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage....
std::shared_ptr< FlowLaw > create()
ConstantInColumn(std::shared_ptr< const Grid > g)
virtual void update(const array::Vector &sliding_velocity, const Inputs &inputs, bool full_update)
Distribute the input velocity throughout the column.
const array::Array3D & velocity_u() const
SSB_Modifier(std::shared_ptr< const Grid > g)
const array::Staggered & diffusive_flux()
Get the diffusive (SIA) vertically-averaged flux on the staggered grid.
std::shared_ptr< const rheology::FlowLaw > flow_law() const
const array::Array3D & velocity_v() const
EnthalpyConverter::Ptr m_EC
double max_diffusivity() const
Get the max diffusivity (for the adaptive time-stepping).
virtual std::string stdout_report() const
std::shared_ptr< rheology::FlowLaw > m_flow_law
array::Staggered1 m_diffusive_flux
Shallow stress balance modifier (such as the non-sliding SIA).