PISM, A Parallel Ice Sheet Model  stable v2.0.6 committed by Constantine Khrulev on 2023-01-23 15:14:38 -0900
ShallowStressBalance.hh
Go to the documentation of this file.
1 // Copyright (C) 2010--2019, 2021 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/iceModelVec.hh"
24 #include "pism/util/IceModelVec2V.hh"
25 #include "pism/util/EnthalpyConverter.hh"
26 
27 namespace pism {
28 namespace rheology {
29 class FlowLaw;
30 }
31 
32 class IceGrid;
33 class IceBasalResistancePlasticLaw;
34 class IceModelVec2CellType;
35 
36 namespace stressbalance {
37 
38 class Inputs;
39 
40 //! Shallow stress balance (such as the SSA).
42 public:
44  virtual ~ShallowStressBalance();
45 
46  // initialization and I/O:
47 
48  void init();
49 
50  virtual void update(const Inputs &inputs, bool full_update) = 0;
51 
52  //! \brief Get the thickness-advective 2D velocity.
53  const IceModelVec2V& velocity() const;
54 
55  //! \brief Get the basal frictional heating (for the adaptive energy time-stepping).
57 
59  const IceModelVec2S &tauc,
60  const IceModelVec2CellType &mask,
61  IceModelVec2S &result) const;
62  // helpers:
63 
64  //! \brief Produce a report string for the standard output.
65  virtual std::string stdout_report() const;
66 
67  std::shared_ptr<const rheology::FlowLaw> flow_law() const;
68 
70 
72 
73  double flow_enhancement_factor() const;
74 protected:
75  virtual void init_impl();
76 
77  virtual DiagnosticList diagnostics_impl() const;
78 
80  std::shared_ptr<rheology::FlowLaw> m_flow_law;
82 
85 
86  //! flow enhancement factor
87  double m_e_factor;
88 };
89 
90 //! Returns zero velocity field, zero friction heating, and zero for D^2.
91 /*!
92  This derived class is used in the non-sliding SIA approximation. This
93  implementation ignores any basal resistance fields (e.g. yield stress from
94  the IceModel or other user of this class).
95 */
97 public:
99  virtual ~ZeroSliding() = default;
100 
101  virtual void update(const Inputs &inputs, bool full_update);
102 
103 protected:
104 };
105 
107 public:
109  virtual ~PrescribedSliding() = default;
110  virtual void update(const Inputs &inputs, bool full_update);
111 protected:
112  virtual void init_impl();
113 };
114 
115 } // end of namespace stressbalance
116 } // end of namespace pism
117 
118 #endif /* _SHALLOWSTRESSBALANCE_H_ */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:101
std::shared_ptr< EnthalpyConverter > Ptr
Class containing physical constants and the constitutive relation describing till for SSA.
std::shared_ptr< const IceGrid > ConstPtr
Definition: IceGrid.hh:233
"Cell type" mask. Adds convenience methods to IceModelVec2Int.
virtual void update(const Inputs &inputs, bool full_update)
Update the trivial shallow stress balance object.
std::shared_ptr< const rheology::FlowLaw > flow_law() const
virtual DiagnosticList diagnostics_impl() const
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
void compute_basal_frictional_heating(const IceModelVec2V &velocity, const IceModelVec2S &tauc, const IceModelVec2CellType &mask, IceModelVec2S &result) const
Compute the basal frictional heating.
virtual std::string stdout_report() const
Produce a report string for the standard output.
const IceModelVec2S & basal_frictional_heating()
Get the basal frictional heating (for the adaptive energy time-stepping).
EnthalpyConverter::Ptr enthalpy_converter() const
const IceModelVec2V & velocity() const
Get the thickness-advective 2D velocity.
Shallow stress balance (such as the SSA).
virtual void update(const Inputs &inputs, bool full_update)
Update the trivial shallow stress balance object.
Returns zero velocity field, zero friction heating, and zero for D^2.
static const double g
Definition: exactTestP.cc:39
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:117