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
SSB_Modifier.hh
Go to the documentation of this file.
1// Copyright (C) 2010--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#ifndef _SSB_MODIFIER_H_
20#define _SSB_MODIFIER_H_
21
22#include "pism/util/array/Staggered.hh"
23#include "pism/util/Component.hh"
24#include "pism/util/EnthalpyConverter.hh"
25
26namespace pism {
27
28class Vars;
29
30namespace rheology {
31class FlowLaw;
32}
33
34namespace stressbalance {
35
36class Inputs;
37
38//! Shallow stress balance modifier (such as the non-sliding SIA).
39class SSB_Modifier : public Component {
40public:
41 SSB_Modifier(std::shared_ptr<const Grid> g);
42 virtual ~SSB_Modifier() = default;
43
44 virtual void init();
45
46 virtual void update(const array::Vector &sliding_velocity,
47 const Inputs &inputs,
48 bool full_update) = 0;
49
50 //! \brief Get the diffusive (SIA) vertically-averaged flux on the staggered grid.
52
53 //! \brief Get the max diffusivity (for the adaptive time-stepping).
54 double max_diffusivity() const;
55
56 const array::Array3D& velocity_u() const;
57
58 const array::Array3D& velocity_v() const;
59
60 virtual std::string stdout_report() const;
61
62 std::shared_ptr<const rheology::FlowLaw> flow_law() const;
63
64protected:
65 std::shared_ptr<rheology::FlowLaw> m_flow_law;
67 double m_D_max;
70};
71
72
73//! The trivial Shallow Stress Balance modifier.
75public:
76 ConstantInColumn(std::shared_ptr<const Grid> g);
77 virtual ~ConstantInColumn() = default;
78
79 virtual void init();
80
81 virtual void update(const array::Vector &sliding_velocity,
82 const Inputs &inputs,
83 bool full_update);
84};
85
86} // end of namespace stressbalance
87} // end of namespace pism
88
89#endif /* _SSB_MODIFIER_H_ */
A class defining a common interface for most PISM sub-models.
Definition Component.hh:118
std::shared_ptr< EnthalpyConverter > Ptr
A virtual class collecting methods common to ice and bedrock 3D fields.
Definition Array3D.hh:33
A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage....
Definition Staggered.hh:37
virtual void update(const array::Vector &sliding_velocity, const Inputs &inputs, bool full_update)
Distribute the input velocity throughout the column.
The trivial Shallow Stress Balance modifier.
const array::Array3D & velocity_u() const
virtual void update(const array::Vector &sliding_velocity, const Inputs &inputs, bool full_update)=0
const array::Staggered & diffusive_flux()
Get the diffusive (SIA) vertically-averaged flux on the staggered grid.
std::shared_ptr< const rheology::FlowLaw > flow_law() const
const array::Array3D & velocity_v() const
EnthalpyConverter::Ptr m_EC
double max_diffusivity() const
Get the max diffusivity (for the adaptive time-stepping).
virtual std::string stdout_report() const
std::shared_ptr< rheology::FlowLaw > m_flow_law
Shallow stress balance modifier (such as the non-sliding SIA).
static const double g
Definition exactTestP.cc:36