tIcebergRemover.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tIcebergRemover.hh (2044B)
---
1 /* Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 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 #include "pism/util/iceModelVec.hh"
25
26 namespace pism {
27
28 class IceModelVec2CellType;
29
30 namespace calving {
31
32 /*! \brief PISM iceberg remover */
33 /*!
34 * Identifies and removes free-floating icebergs, which cause
35 * well-posedness problems for stress solvers.
36 *
37 * Icebergs are, in this context, floating regions that are _not_
38 * attached, through a chain of positive thickness ice-filled cells,
39 * to at least one grounded cell.
40 *
41 * They cause the SSA operator to have a nontrivial null space.
42 *
43 * They are observed to cause unrealistically large velocities that
44 * may affect ice velocities elsewhere.
45 *
46 * This class uses a serial connected component labeling algorithm to
47 * remove "icebergs".
48 */
49 class IcebergRemover : public Component
50 {
51 public:
52 IcebergRemover(IceGrid::ConstPtr g);
53 virtual ~IcebergRemover();
54
55 virtual void init();
56 void update(const IceModelVec2Int &bc_mask,
57 IceModelVec2CellType &pism_mask,
58 IceModelVec2S &ice_thickness);
59 protected:
60 IceModelVec2S m_iceberg_mask;
61 petsc::Vec::Ptr m_mask_p0;
62 };
63
64 } // end of namespace calving
65 } // end of namespace pism
66
67 #endif /* _PISMICEBERGREMOVER_H_ */