PISM, A Parallel Ice Sheet Model  stable v2.0.4 committed by Constantine Khrulev on 2022-05-25 12:02:27 -0800
OptTillphiYieldStress.hh
Go to the documentation of this file.
1 // Copyright (C) 2011--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 #ifndef _PISMOPTTILLPHIYIELDSTRESS_H_
20 #define _PISMOPTTILLPHIYIELDSTRESS_H_
21 
23 
24 #include "pism/util/iceModelVec.hh"
25 
26 namespace pism {
27 
28 class IceModelVec2CellType;
29 
30 //! Iterative optimization of the till friction angle.
32 public:
34  virtual ~OptTillphiYieldStress() = default;
35 
36 private:
38 
39  void update_tillphi(const IceModelVec2S &ice_surface_elevation,
40  const IceModelVec2S &bed_topography,
41  const IceModelVec2CellType &mask);
42 
43  void init_t_last(const File &input_file);
44  void init_usurf_target(const File &input_file);
45 
46  void init_impl(const YieldStressInputs &inputs);
47  void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs);
48  void restart_impl(const File &input_file, int record);
49  void update_impl(const YieldStressInputs &inputs, double t, double dt);
50 
51  MaxTimestep max_timestep_impl(double t) const;
52 
53  void define_model_state_impl(const File &output) const;
54  void write_model_state_impl(const File &output) const;
55 
59 
60  double m_dphi_scale;
61 
62  // convergence threshold:
63  double m_dhdt_min;
64 
65  // lower and upper bounds of a tillphi adjustment:
66  double m_dphi_min;
67  double m_dphi_max;
68 
69  // constants defining the lower bound of tillphi:
70  double m_phi0_min;
71  double m_phi0_max;
72  double m_topg_min;
73  double m_topg_max;
74 
75  // the upper bound of tillphi:
76  double m_phi_max;
77 
78  //! time of the last till friction angle update
79  double m_t_last;
80  //! Update interval in seconds
82  //! Temporal resolution to use when checking whether it's time to update
83  double m_t_eps;
84  //! Name of the variable used to store the last update time.
85  std::string m_time_name;
86 };
87 
88 } // end of namespace pism
89 
90 #endif /* _PISMOPTTILLPHIYIELDSTRESS_H_ */
High-level PISM I/O class.
Definition: File.hh:51
std::shared_ptr< const IceGrid > ConstPtr
Definition: IceGrid.hh:233
"Cell type" mask. Adds convenience methods to IceModelVec2Int.
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
Definition: MaxTimestep.hh:31
PISM's default basal yield stress model which applies the Mohr-Coulomb model of deformable,...
void define_model_state_impl(const File &output) const
MaxTimestep max_timestep_impl(double t) const
void bootstrap_impl(const File &input_file, const YieldStressInputs &inputs)
void init_t_last(const File &input_file)
void init_impl(const YieldStressInputs &inputs)
OptTillphiYieldStress(IceGrid::ConstPtr g)
double m_update_interval
Update interval in seconds.
DiagnosticList diagnostics_impl() const
double m_t_last
time of the last till friction angle update
void update_tillphi(const IceModelVec2S &ice_surface_elevation, const IceModelVec2S &bed_topography, const IceModelVec2CellType &mask)
virtual ~OptTillphiYieldStress()=default
void restart_impl(const File &input_file, int record)
std::string m_time_name
Name of the variable used to store the last update time.
double m_t_eps
Temporal resolution to use when checking whether it's time to update.
void write_model_state_impl(const File &output) const
The default (empty implementation).
void update_impl(const YieldStressInputs &inputs, double t, double dt)
void init_usurf_target(const File &input_file)
Iterative optimization of the till friction angle.
static const double g
Definition: exactTestP.cc:39
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:117