tYieldStress.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tYieldStress.hh (2408B)
---
1 // Copyright (C) 2004--2012, 2014, 2015, 2016, 2017, 2018, 2019 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
29 class YieldStressInputs {
30 public:
31 YieldStressInputs();
32
33 const Geometry *geometry;
34
35 const IceModelVec2S *till_water_thickness;
36
37 const IceModelVec2S *subglacial_water_thickness;
38
39 // inputs used by regional models
40 const IceModelVec2Int *no_model_mask;
41 };
42
43 //! \brief The PISM basal yield stress model interface (virtual base class)
44 class YieldStress : public Component {
45 public:
46 YieldStress(IceGrid::ConstPtr g);
47 virtual ~YieldStress();
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
57 const IceModelVec2S& basal_material_yield_stress();
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
73 DiagnosticList diagnostics_impl() const;
74
75 IceModelVec2S m_basal_yield_stress;
76
77 std::string m_name;
78 };
79
80 } // end of namespace pism
81
82 #endif /* _PISMYIELDSTRESS_H_ */