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
Isochrones.hh
Go to the documentation of this file.
1/* Copyright (C) 2023 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#include "pism/util/Component.hh"
21#include <memory>
22#include <vector>
23
24namespace pism {
25
26namespace array {
27class Array3D;
28class Scalar;
29} // namespace array
30
31namespace stressbalance {
32class StressBalance;
33}
34
35/*!
36 * The isochrone tracing scheme of [@ref Born2016] and [@ref Born2021].
37 */
38class Isochrones : public Component {
39public:
40 Isochrones(std::shared_ptr<const Grid> grid,
41 std::shared_ptr<const stressbalance::StressBalance> stress_balance);
42 virtual ~Isochrones() = default;
43
44 void bootstrap(const array::Scalar &ice_thickness);
45
46 void restart(const File &input_file, int record);
47
48 void update(double t, double dt,
49 const array::Array3D &u,
50 const array::Array3D &v,
51 const array::Scalar &ice_thickness,
52 const array::Scalar &top_surface_mass_balance,
53 const array::Scalar &bottom_surface_mass_balance);
54
55 const array::Array3D& layer_thicknesses() const;
56
57private:
58 MaxTimestep max_timestep_impl(double t) const;
59
62
63 void define_model_state_impl(const File &output) const;
64 void write_model_state_impl(const File &output) const;
65
67
69
70 void initialize(const File &input_file, int record, bool use_interpolation);
71
72 //! isochronal layer thicknesses
73 std::shared_ptr<array::Array3D> m_layer_thickness;
74
75 //! temporary storage needed for time stepping
76 std::shared_ptr<array::Array3D> m_tmp;
77
78 //! The index of the topmost isochronal layer.
80
81 std::shared_ptr<const stressbalance::StressBalance> m_stress_balance;
82};
83
84} // end of namespace pism
std::shared_ptr< const Grid > grid() const
Definition Component.cc:105
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
std::shared_ptr< array::Array3D > m_layer_thickness
isochronal layer thicknesses
Definition Isochrones.hh:73
void bootstrap(const array::Scalar &ice_thickness)
MaxTimestep max_timestep_deposition_times(double t) const
void update(double t, double dt, const array::Array3D &u, const array::Array3D &v, const array::Scalar &ice_thickness, const array::Scalar &top_surface_mass_balance, const array::Scalar &bottom_surface_mass_balance)
MaxTimestep max_timestep_impl(double t) const
std::shared_ptr< array::Array3D > m_tmp
temporary storage needed for time stepping
Definition Isochrones.hh:76
void write_model_state_impl(const File &output) const
std::shared_ptr< const stressbalance::StressBalance > m_stress_balance
Definition Isochrones.hh:81
DiagnosticList diagnostics_impl() const
size_t m_top_layer_index
The index of the topmost isochronal layer.
Definition Isochrones.hh:79
double top_layer_deposition_time() const
void define_model_state_impl(const File &output) const
void restart(const File &input_file, int record)
virtual ~Isochrones()=default
const array::Array3D & layer_thicknesses() const
void initialize(const File &input_file, int record, bool use_interpolation)
MaxTimestep max_timestep_cfl() const
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
A virtual class collecting methods common to ice and bedrock 3D fields.
Definition Array3D.hh:33
The class defining PISM's interface to the shallow stress balance code.
std::map< std::string, Diagnostic::Ptr > DiagnosticList