PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
ShallowStressBalance.hh
Go to the documentation of this file.
1 // Copyright (C) 2010--2019, 2021, 2022 Constantine Khroulev and Ed Bueler
2 //
3 // This file is part of PISM.
4 //
5 // PISM is free software; you can redistribute it and/or modify it under the
6 // terms of the GNU General Public License as published by the Free Software
7 // Foundation; either version 3 of the License, or (at your option) any later
8 // version.
9 //
10 // PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with PISM; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef _SHALLOWSTRESSBALANCE_H_
20 #define _SHALLOWSTRESSBALANCE_H_
21 
22 #include "pism/util/Component.hh"
23 #include "pism/util/array/Vector.hh"
24 #include "pism/util/EnthalpyConverter.hh"
25 
26 namespace pism {
27 namespace rheology {
28 class FlowLaw;
29 }
30 
31 class Grid;
32 class IceBasalResistancePlasticLaw;
33 
34 namespace stressbalance {
35 
36 class Inputs;
37 
38 //! Shallow stress balance (such as the SSA).
40 public:
41  ShallowStressBalance(std::shared_ptr<const Grid> g);
42  virtual ~ShallowStressBalance();
43 
44  // initialization and I/O:
45 
46  void init();
47 
48  virtual void update(const Inputs &inputs, bool full_update) = 0;
49 
50  //! \brief Get the thickness-advective 2D velocity.
51  const array::Vector1& velocity() const;
52 
53  //! \brief Get the basal frictional heating (for the adaptive energy time-stepping).
55 
57  const array::Scalar &tauc,
58  const array::CellType &mask,
59  array::Scalar &result) const;
60  // helpers:
61 
62  //! \brief Produce a report string for the standard output.
63  virtual std::string stdout_report() const;
64 
65  std::shared_ptr<const rheology::FlowLaw> flow_law() const;
66 
68 
70 
71  double flow_enhancement_factor() const;
72 protected:
73  virtual void init_impl();
74 
75  virtual DiagnosticList diagnostics_impl() const;
76 
78  std::shared_ptr<rheology::FlowLaw> m_flow_law;
80 
83 
84  //! flow enhancement factor
85  double m_e_factor;
86 };
87 
88 //! Returns zero velocity field, zero friction heating, and zero for D^2.
89 /*!
90  This derived class is used in the non-sliding SIA approximation. This
91  implementation ignores any basal resistance fields (e.g. yield stress from
92  the IceModel or other user of this class).
93 */
95 public:
96  ZeroSliding(std::shared_ptr<const Grid> g);
97  virtual ~ZeroSliding() = default;
98 
99  virtual void update(const Inputs &inputs, bool full_update);
100 
101 protected:
102 };
103 
105 public:
106  PrescribedSliding(std::shared_ptr<const Grid> g);
107  virtual ~PrescribedSliding() = default;
108  virtual void update(const Inputs &inputs, bool full_update);
109 protected:
110  virtual void init_impl();
111 };
112 
113 } // end of namespace stressbalance
114 } // end of namespace pism
115 
116 #endif /* _SHALLOWSTRESSBALANCE_H_ */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:118
std::shared_ptr< EnthalpyConverter > Ptr
Class containing physical constants and the constitutive relation describing till for SSA.
"Cell type" mask. Adds convenience methods to array::Scalar.
Definition: CellType.hh:30
PrescribedSliding(std::shared_ptr< const Grid > g)
virtual void update(const Inputs &inputs, bool full_update)
Update the trivial shallow stress balance object.
const array::Vector1 & velocity() const
Get the thickness-advective 2D velocity.
void compute_basal_frictional_heating(const array::Vector &velocity, const array::Scalar &tauc, const array::CellType &mask, array::Scalar &result) const
Compute the basal frictional heating.
std::shared_ptr< const rheology::FlowLaw > flow_law() const
virtual DiagnosticList diagnostics_impl() const
ShallowStressBalance(std::shared_ptr< const Grid > g)
std::shared_ptr< rheology::FlowLaw > m_flow_law
IceBasalResistancePlasticLaw * m_basal_sliding_law
const IceBasalResistancePlasticLaw * sliding_law() const
virtual void update(const Inputs &inputs, bool full_update)=0
virtual std::string stdout_report() const
Produce a report string for the standard output.
const array::Scalar & basal_frictional_heating()
Get the basal frictional heating (for the adaptive energy time-stepping).
EnthalpyConverter::Ptr enthalpy_converter() const
Shallow stress balance (such as the SSA).
virtual void update(const Inputs &inputs, bool full_update)
Update the trivial shallow stress balance object.
ZeroSliding(std::shared_ptr< const Grid > g)
Returns zero velocity field, zero friction heating, and zero for D^2.
static const double g
Definition: exactTestP.cc:36
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:125