PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
IcebergRemover.hh
Go to the documentation of this file.
1 /* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018, 2020, 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 _PISMICEBERGREMOVER_H_
21 #define _PISMICEBERGREMOVER_H_
22 
23 #include "pism/util/Component.hh"
24 
25 namespace pism {
26 
27 namespace calving {
28 
29 /*! \brief PISM iceberg remover */
30 /*!
31  * Identifies and removes free-floating icebergs, which cause
32  * well-posedness problems for stress solvers.
33  *
34  * Icebergs are, in this context, floating regions that are _not_
35  * attached, through a chain of positive thickness ice-filled cells,
36  * to at least one grounded cell.
37  *
38  * They cause the SSA operator to have a nontrivial null space.
39  *
40  * They are observed to cause unrealistically large velocities that
41  * may affect ice velocities elsewhere.
42  *
43  * This class uses a serial connected component labeling algorithm to
44  * remove "icebergs".
45  */
46 class IcebergRemover : public Component
47 {
48 public:
49  IcebergRemover(std::shared_ptr<const Grid> g);
50  virtual ~IcebergRemover() = default;
51 
52  void update(const array::Scalar &bc_mask,
53  array::CellType1 &cell_type,
54  array::Scalar &ice_thickness);
55 protected:
56  virtual void update_impl(const array::Scalar &bc_mask,
57  array::CellType1 &cell_type,
58  array::Scalar &ice_thickness);
59 
60 
62  std::shared_ptr<petsc::Vec> m_mask_p0;
63 };
64 
65 } // end of namespace calving
66 } // end of namespace pism
67 
68 #endif /* _PISMICEBERGREMOVER_H_ */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:118
std::shared_ptr< petsc::Vec > m_mask_p0
virtual void update_impl(const array::Scalar &bc_mask, array::CellType1 &cell_type, array::Scalar &ice_thickness)
void update(const array::Scalar &bc_mask, array::CellType1 &cell_type, array::Scalar &ice_thickness)
virtual ~IcebergRemover()=default
IcebergRemover(std::shared_ptr< const Grid > g)
PISM iceberg remover.
static const double g
Definition: exactTestP.cc:36