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
FrontRetreat.hh
Go to the documentation of this file.
1/* Copyright (C) 2016, 2017, 2018, 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
20#ifndef FRONTRETREAT_H
21#define FRONTRETREAT_H
22
23#include "pism/util/Component.hh"
24#include "pism/util/array/CellType.hh"
25#include "pism/util/MaxTimestep.hh"
26
27namespace pism {
28
29class Geometry;
30
31//! An abstract class implementing calving front retreat resulting from application of a
32//! spatially-variable horizontal retreat rate.
33/*! The retreat rate may correspond to frontal melting or calving. Requires the
34 "part_grid" mechanism and a grid with dx == dy.
35 */
36class FrontRetreat : public Component {
37public:
38 FrontRetreat(std::shared_ptr<const Grid> g);
39 ~FrontRetreat() = default;
40
41 void update_geometry(double dt,
42 const Geometry &geometry,
43 const array::Scalar1 &bc_mask,
44 const array::Scalar &retreat_rate,
45 array::Scalar &Href,
46 array::Scalar1 &ice_thickness);
47
49 const array::Scalar &bc_mask,
50 const array::Scalar &retreat_rate) const;
51private:
52
54 array::CellType1 &output) const;
55
56 // Ghosted cell type mask
57 //
58 // We make a copy here because frontal retreat code uses a modified mask if
59 // geometry.front_retreat.wrap_around is false.
61 // Temporary storage for distributing ice loss to "full" (as opposed to "partially
62 // filled") cells near the front
64};
65
66} // end of namespace pism
67
68
69#endif /* FRONTRETREAT_H */
A class defining a common interface for most PISM sub-models.
Definition Component.hh:118
void update_geometry(double dt, const Geometry &geometry, const array::Scalar1 &bc_mask, const array::Scalar &retreat_rate, array::Scalar &Href, array::Scalar1 &ice_thickness)
array::CellType1 m_cell_type
MaxTimestep max_timestep(const array::CellType1 &cell_type, const array::Scalar &bc_mask, const array::Scalar &retreat_rate) const
~FrontRetreat()=default
array::Scalar1 m_tmp
void compute_modified_mask(const array::CellType1 &input, array::CellType1 &output) const
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
static const double g
Definition exactTestP.cc:36