PISM, A Parallel Ice Sheet Model  stable v2.0.5 committed by Constantine Khrulev on 2022-10-14 09:56:26 -0800
EmptyingProblem.hh
Go to the documentation of this file.
1 /* Copyright (C) 2019, 2020, 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 
20 #ifndef EMPTYINGPROBLEM_H
21 #define EMPTYINGPROBLEM_H
22 
23 #include "pism/util/Component.hh"
24 #include "pism/util/IceModelVec2V.hh"
25 
26 namespace pism {
27 
28 class Geometry;
29 
30 namespace hydrology {
31 
32 class EmptyingProblem : public Component {
33 public:
35  virtual ~EmptyingProblem() = default;
36 
37  void update(const Geometry &geometry,
38  const IceModelVec2Int *no_model_mask,
39  const IceModelVec2S &water_input_rate,
40  bool recompute_potential = true);
41 
42  // output
43  const IceModelVec2V& flux() const;
44 
45  // diagnostics
48  const IceModelVec2S& potential() const;
49  const IceModelVec2S& adjustment() const;
50  const IceModelVec2Int& sinks() const;
51 
53 
54 protected:
55 
56  virtual void compute_raw_potential(const IceModelVec2S &ice_thickness,
58  IceModelVec2S &result) const;
59 
60  void compute_potential(const IceModelVec2S &ice_thickness,
62  const IceModelVec2Int &domain_mask,
63  IceModelVec2S &result);
64 
66  const IceModelVec2Int &mask,
67  IceModelVec2Stag &result) const;
68 
69  void compute_mask(const IceModelVec2CellType &cell_type,
70  const IceModelVec2Int *no_model_mask,
71  IceModelVec2Int &result) const;
72 
80 
85 
86  double m_dx;
87  double m_dy;
88 
90  double m_speed;
91  double m_tau;
92 };
93 
94 } // end of namespace hydrology
95 } // end of namespace pism
96 
97 #endif /* EMPTYINGPROBLEM_H */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:101
std::shared_ptr< const IceGrid > ConstPtr
Definition: IceGrid.hh:233
"Cell type" mask. Adds convenience methods to IceModelVec2Int.
A simple class "hiding" the fact that the mask is stored as floating-point scalars (instead of intege...
Definition: iceModelVec.hh:389
A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage....
Definition: iceModelVec.hh:449
virtual ~EmptyingProblem()=default
const IceModelVec2V & flux() const
virtual void compute_raw_potential(const IceModelVec2S &ice_thickness, const IceModelVec2S &ice_bottom_surface, IceModelVec2S &result) const
void update(const Geometry &geometry, const IceModelVec2Int *no_model_mask, const IceModelVec2S &water_input_rate, bool recompute_potential=true)
const IceModelVec2Int & sinks() const
DiagnosticList diagnostics() const
EmptyingProblem(IceGrid::ConstPtr g)
const IceModelVec2V & effective_water_velocity() const
const IceModelVec2S & potential() const
void compute_velocity(const IceModelVec2S &hydraulic_potential, const IceModelVec2Int &mask, IceModelVec2Stag &result) const
void compute_potential(const IceModelVec2S &ice_thickness, const IceModelVec2S &ice_bottom_surface, const IceModelVec2Int &domain_mask, IceModelVec2S &result)
const IceModelVec2S & remaining_water_thickness() const
void compute_mask(const IceModelVec2CellType &cell_type, const IceModelVec2Int *no_model_mask, IceModelVec2Int &result) const
const IceModelVec2S & adjustment() const
void hydraulic_potential(const IceModelVec2S &W, const IceModelVec2S &P, const IceModelVec2S &sea_level, const IceModelVec2S &bed, const IceModelVec2S &ice_thickness, IceModelVec2S &result)
Compute the hydraulic potential.
Definition: Routing.cc:195
static const double g
Definition: exactTestP.cc:39
std::map< std::string, Diagnostic::Ptr > DiagnosticList
Definition: Diagnostic.hh:117
void ice_bottom_surface(const Geometry &geometry, IceModelVec2S &result)
Definition: Geometry.cc:223