PISM, A Parallel Ice Sheet Model  stable v2.0.4 committed by Constantine Khrulev on 2022-05-25 12:02:27 -0800
YieldStress.hh
Go to the documentation of this file.
1 // Copyright (C) 2004--2012, 2014, 2015, 2016, 2017, 2018, 2019, 2021 Jed Brown, Ed Bueler and Constantine Khroulev
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 _PISMYIELDSTRESS_H_
20 #define _PISMYIELDSTRESS_H_
21 
22 #include "pism/util/Component.hh"
23 #include "pism/util/iceModelVec.hh"
24 
25 namespace pism {
26 
27 class Geometry;
28 
30 public:
32 
34 
36 
38 
39  // inputs used by regional models
41 };
42 
43 //! \brief The PISM basal yield stress model interface (virtual base class)
44 class YieldStress : public Component {
45 public:
47  virtual ~YieldStress() = default;
48 
49  void restart(const File &input_file, int record);
50 
51  void bootstrap(const File &input_file, const YieldStressInputs &inputs);
52 
53  void init(const YieldStressInputs &inputs);
54 
55  void update(const YieldStressInputs &inputs, double t, double dt);
56 
58 
59  std::string name() const;
60 protected:
61  virtual void restart_impl(const File &input_file, int record) = 0;
62 
63  virtual void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs) = 0;
64 
65  virtual void init_impl(const YieldStressInputs &inputs) = 0;
66 
67  virtual void update_impl(const YieldStressInputs &inputs, double t, double dt) = 0;
68 
69  virtual void define_model_state_impl(const File &output) const;
70 
71  virtual void write_model_state_impl(const File &output) const;
72 
74 
76 
77  std::string m_name;
78 };
79 
80 } // end of namespace pism
81 
82 #endif /* _PISMYIELDSTRESS_H_ */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:101
High-level PISM I/O class.
Definition: File.hh:51
std::shared_ptr< const IceGrid > ConstPtr
Definition: IceGrid.hh:233
A simple class "hiding" the fact that the mask is stored as floating-point scalars (instead of intege...
Definition: iceModelVec.hh:389
const IceModelVec2S * till_water_thickness
Definition: YieldStress.hh:35
const IceModelVec2Int * no_model_mask
Definition: YieldStress.hh:40
const IceModelVec2S * subglacial_water_thickness
Definition: YieldStress.hh:37
const Geometry * geometry
Definition: YieldStress.hh:33
std::string m_name
Definition: YieldStress.hh:77
void bootstrap(const File &input_file, const YieldStressInputs &inputs)
Definition: YieldStress.cc:57
virtual void init_impl(const YieldStressInputs &inputs)=0
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
Definition: YieldStress.cc:101
const IceModelVec2S & basal_material_yield_stress()
Definition: YieldStress.cc:80
void update(const YieldStressInputs &inputs, double t, double dt)
Definition: YieldStress.cc:76
virtual void restart_impl(const File &input_file, int record)=0
std::string name() const
Definition: YieldStress.cc:109
YieldStress(IceGrid::ConstPtr g)
Definition: YieldStress.cc:34
IceModelVec2S m_basal_yield_stress
Definition: YieldStress.hh:75
virtual ~YieldStress()=default
DiagnosticList diagnostics_impl() const
Definition: YieldStress.cc:105
virtual void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)=0
void init(const YieldStressInputs &inputs)
Definition: YieldStress.cc:67
virtual void define_model_state_impl(const File &output) const
Definition: YieldStress.cc:97
void restart(const File &input_file, int record)
Definition: YieldStress.cc:48
virtual void update_impl(const YieldStressInputs &inputs, double t, double dt)=0
The PISM basal yield stress model interface (virtual base class)
Definition: YieldStress.hh:44
static const double g
Definition: exactTestP.cc:39
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:117