PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
FractureDensity.hh
Go to the documentation of this file.
1 /* Copyright (C) 2019, 2021, 2022 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/Component.hh"
23 #include "pism/rheology/FlowLaw.hh"
24 #include "pism/util/array/Scalar.hh"
25 #include "pism/util/array/Vector.hh"
26 #include "pism/util/array/Array2D.hh"
27 #include "pism/stressbalance/StressBalance.hh"
28 
29 namespace pism {
30 
31 class Grid;
32 class Geometry;
33 
34 class FractureDensity : public Component {
35 public:
36  FractureDensity(std::shared_ptr<const Grid> grid, std::shared_ptr<const rheology::FlowLaw> flow_law);
37  virtual ~FractureDensity() = default;
38 
39  void restart(const File &input_file, int record);
40  void bootstrap(const File &input_file);
41  void initialize(const array::Scalar &density, const array::Scalar &age);
42  void initialize();
43 
44  void update(double dt,
45  const Geometry &geometry,
46  const array::Vector &velocity,
47  const array::Scalar &hardness,
48  const array::Scalar &inflow_boundary_mask);
49 
50  const array::Scalar& density() const;
51  const array::Scalar& growth_rate() const;
52  const array::Scalar& healing_rate() const;
53  const array::Scalar& flow_enhancement() const;
54  const array::Scalar& age() const;
55  const array::Scalar& toughness() const;
56 
57 private:
58 
59  void define_model_state_impl(const File &output) const;
60  void write_model_state_impl(const File &output) const;
61 
63 
72 
73  //! major and minor principal components of horizontal strain-rate tensor (temporary storage)
75 
76  //! components of horizontal stress tensor along axes and shear stress (temporary storage)
78 
79  //! Ghosted copy of the ice velocity
81 
82  std::shared_ptr<const rheology::FlowLaw> m_flow_law;
83 };
84 
85 } // end of namespace pism
86 
87 #endif /* FRACTUREDENSITY_H */
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:56
void define_model_state_impl(const File &output) const
The default (empty implementation).
void restart(const File &input_file, int record)
virtual ~FractureDensity()=default
void update(double dt, const Geometry &geometry, const array::Vector &velocity, const array::Scalar &hardness, const array::Scalar &inflow_boundary_mask)
FractureDensity(std::shared_ptr< const Grid > grid, std::shared_ptr< const rheology::FlowLaw > flow_law)
array::Array2D< stressbalance::DeviatoricStresses > m_deviatoric_stresses
components of horizontal stress tensor along axes and shear stress (temporary storage)
array::Scalar m_density_new
const array::Scalar & toughness() const
const array::Scalar & growth_rate() const
array::Array2D< stressbalance::PrincipalStrainRates > m_strain_rates
major and minor principal components of horizontal strain-rate tensor (temporary storage)
const array::Scalar & age() const
array::Scalar m_healing_rate
void bootstrap(const File &input_file)
void write_model_state_impl(const File &output) const
The default (empty implementation).
std::shared_ptr< const rheology::FlowLaw > m_flow_law
array::Scalar1 m_density
array::Scalar m_growth_rate
const array::Scalar & healing_rate() const
const array::Scalar & flow_enhancement() const
DiagnosticList diagnostics_impl() const
array::Scalar m_toughness
array::Scalar m_flow_enhancement
const array::Scalar & density() const
array::Vector1 m_velocity
Ghosted copy of the ice velocity.
A storage vector combining related fields in a struct.
Definition: Array2D.hh:32
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:125