Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
24namespace pism {
25
26class Geometry;
27
29public:
31
33
35
37
38 // inputs used by regional models
40};
41
42//! \brief The PISM basal yield stress model interface (virtual base class)
43class YieldStress : public Component {
44public:
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;
59protected:
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:55
const array::Scalar * till_water_thickness
const array::Scalar * subglacial_water_thickness
const Geometry * geometry
const array::Scalar * no_model_mask
std::string m_name
void bootstrap(const File &input_file, const YieldStressInputs &inputs)
virtual void init_impl(const YieldStressInputs &inputs)=0
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
const array::Scalar & basal_material_yield_stress()
void update(const YieldStressInputs &inputs, double t, double dt)
virtual void restart_impl(const File &input_file, int record)=0
std::string name() const
virtual ~YieldStress()=default
DiagnosticList diagnostics_impl() const
virtual void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)=0
void init(const YieldStressInputs &inputs)
virtual void define_model_state_impl(const File &output) const
array::Scalar2 m_basal_yield_stress
void restart(const File &input_file, int record)
virtual void update_impl(const YieldStressInputs &inputs, double t, double dt)=0
The PISM basal yield stress model interface (virtual base class)
static const double g
Definition exactTestP.cc:36
std::map< std::string, Diagnostic::Ptr > DiagnosticList