PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
RegionalYieldStress.hh
Go to the documentation of this file.
1 /* Copyright (C) 2015, 2017, 2018, 2019, 2021 PISM Authors
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 
20 #ifndef _REGIONAL_YIELD_STRESS_H_
21 #define _REGIONAL_YIELD_STRESS_H_
22 
23 #include "pism/basalstrength/YieldStress.hh"
24 
25 namespace pism {
26 
27 /*!
28  * Regional version of yield stress models. Sets high tauc in "no model" areas.
29  *
30  * Note: this class has to implement all the virtual methods of `Component` because it has
31  * to forward these calls to the model provided to its constructor.
32  */
34 public:
35  RegionalYieldStress(std::shared_ptr<YieldStress> input);
36  virtual ~RegionalYieldStress() = default;
37 private:
38  void restart_impl(const File &input_file, int record);
39 
40  void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs);
41 
42  void init_impl(const YieldStressInputs &inputs);
43 
44  void update_impl(const YieldStressInputs &inputs, double t, double dt);
45 
46  MaxTimestep max_timestep_impl(double t) const;
47 
48  void define_model_state_impl(const File &output) const;
49 
50  void write_model_state_impl(const File &output) const;
51 
53 
55 
56  std::shared_ptr<YieldStress> m_input;
57 
58  double m_high_tauc;
59 };
60 
61 } // end of namespace pism
62 
63 #endif /* _REGIONAL_YIELD_STRESS_H_ */
High-level PISM I/O class.
Definition: File.hh:56
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
Definition: MaxTimestep.hh:31
std::shared_ptr< YieldStress > m_input
TSDiagnosticList ts_diagnostics_impl() const
DiagnosticList diagnostics_impl() const
void write_model_state_impl(const File &output) const
The default (empty implementation).
MaxTimestep max_timestep_impl(double t) const
virtual ~RegionalYieldStress()=default
void update_impl(const YieldStressInputs &inputs, double t, double dt)
void restart_impl(const File &input_file, int record)
RegionalYieldStress(std::shared_ptr< YieldStress > input)
void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)
void init_impl(const YieldStressInputs &inputs)
void define_model_state_impl(const File &output) const
The PISM basal yield stress model interface (virtual base class)
Definition: YieldStress.hh:43
std::map< std::string, TSDiagnostic::Ptr > TSDiagnosticList
Definition: Diagnostic.hh:343
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:125