PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
YieldStress.hh
Go to the documentation of this file.
1 // Copyright (C) 2004--2012, 2014, 2015, 2016, 2017, 2018, 2019, 2021, 2022 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 
24 namespace pism {
25 
26 class Geometry;
27 
29 public:
31 
33 
35 
37 
38  // inputs used by regional models
40 };
41 
42 //! \brief The PISM basal yield stress model interface (virtual base class)
43 class YieldStress : public Component {
44 public:
45  YieldStress(std::shared_ptr<const Grid> g);
46  virtual ~YieldStress() = default;
47 
48  void restart(const File &input_file, int record);
49 
50  void bootstrap(const File &input_file, const YieldStressInputs &inputs);
51 
52  void init(const YieldStressInputs &inputs);
53 
54  void update(const YieldStressInputs &inputs, double t, double dt);
55 
57 
58  std::string name() const;
59 protected:
60  virtual void restart_impl(const File &input_file, int record) = 0;
61 
62  virtual void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs) = 0;
63 
64  virtual void init_impl(const YieldStressInputs &inputs) = 0;
65 
66  virtual void update_impl(const YieldStressInputs &inputs, double t, double dt) = 0;
67 
68  virtual void define_model_state_impl(const File &output) const;
69 
70  virtual void write_model_state_impl(const File &output) const;
71 
73 
75 
76  std::string m_name;
77 };
78 
79 } // end of namespace pism
80 
81 #endif /* _PISMYIELDSTRESS_H_ */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:118
High-level PISM I/O class.
Definition: File.hh:56
const array::Scalar * till_water_thickness
Definition: YieldStress.hh:34
const array::Scalar * subglacial_water_thickness
Definition: YieldStress.hh:36
const Geometry * geometry
Definition: YieldStress.hh:32
const array::Scalar * no_model_mask
Definition: YieldStress.hh:39
std::string m_name
Definition: YieldStress.hh:76
YieldStress(std::shared_ptr< const Grid > g)
Definition: YieldStress.cc:34
void bootstrap(const File &input_file, const YieldStressInputs &inputs)
Definition: YieldStress.cc:56
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:100
const array::Scalar & basal_material_yield_stress()
Definition: YieldStress.cc:79
void update(const YieldStressInputs &inputs, double t, double dt)
Definition: YieldStress.cc:75
virtual void restart_impl(const File &input_file, int record)=0
std::string name() const
Definition: YieldStress.cc:108
virtual ~YieldStress()=default
DiagnosticList diagnostics_impl() const
Definition: YieldStress.cc:104
virtual void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)=0
void init(const YieldStressInputs &inputs)
Definition: YieldStress.cc:66
virtual void define_model_state_impl(const File &output) const
Definition: YieldStress.cc:96
array::Scalar2 m_basal_yield_stress
Definition: YieldStress.hh:74
void restart(const File &input_file, int record)
Definition: YieldStress.cc:47
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:43
static const double g
Definition: exactTestP.cc:36
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:125