tFractureDensity.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tFractureDensity.hh (2688B)
---
1 /* Copyright (C) 2019 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 FRACTUREDENSITY_H
20 #define FRACTUREDENSITY_H
21
22 #include "pism/util/IceGrid.hh"
23 #include "pism/util/Component.hh"
24 #include "pism/rheology/FlowLaw.hh"
25
26 namespace pism {
27
28 class IceModelVec2S;
29 class IceModelVec2;
30 class Geometry;
31
32 class FractureDensity : public Component {
33 public:
34 FractureDensity(IceGrid::ConstPtr grid, std::shared_ptr<const rheology::FlowLaw> flow_law);
35 virtual ~FractureDensity();
36
37 void restart(const File &input_file, int record);
38 void bootstrap(const File &input_file);
39 void initialize(const IceModelVec2S &density, const IceModelVec2S &age);
40 void initialize();
41
42 void update(double dt,
43 const Geometry &geometry,
44 const IceModelVec2V &velocity,
45 const IceModelVec2S &hardness,
46 const IceModelVec2S &inflow_boundary_mask);
47
48 const IceModelVec2S& density() const;
49 const IceModelVec2S& growth_rate() const;
50 const IceModelVec2S& healing_rate() const;
51 const IceModelVec2S& flow_enhancement() const;
52 const IceModelVec2S& age() const;
53 const IceModelVec2S& toughness() const;
54
55 private:
56
57 void define_model_state_impl(const File &output) const;
58 void write_model_state_impl(const File &output) const;
59
60 DiagnosticList diagnostics_impl() const;
61
62 IceModelVec2S m_density;
63 IceModelVec2S m_density_new;
64 IceModelVec2S m_growth_rate;
65 IceModelVec2S m_healing_rate;
66 IceModelVec2S m_flow_enhancement;
67 IceModelVec2S m_age;
68 IceModelVec2S m_age_new;
69 IceModelVec2S m_toughness;
70
71 //! major and minor principal components of horizontal strain-rate tensor (temporary storage)
72 IceModelVec2 m_strain_rates;
73
74 //! components of horizontal stress tensor along axes and shear stress (temporary storage)
75 IceModelVec2 m_deviatoric_stresses;
76
77 //! Ghosted copy of the ice velocity
78 IceModelVec2V m_velocity;
79
80 std::shared_ptr<const rheology::FlowLaw> m_flow_law;
81 };
82
83 } // end of namespace pism
84
85 #endif /* FRACTUREDENSITY_H */