PISM, A Parallel Ice Sheet Model
stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
src
util
label_components.hh
Go to the documentation of this file.
1
/* Copyright (C) 2019, 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
20
#ifndef LABEL_COMPONENTS_H
21
#define LABEL_COMPONENTS_H
22
23
namespace
pism
{
24
25
namespace
array {
26
class
Scalar;
27
}
28
29
namespace
petsc {
30
class
Vec;
31
}
32
33
/*!
34
* Label connected components in a mask stored in an array::Scalar.
35
*
36
* @param[in,out] mask_p0 temporary storage on rank 0.
37
*
38
* See the other `label_components()` details.
39
*/
40
void
label_components
(array::Scalar &mask,
41
petsc::Vec &mask_p0,
42
bool
identify_icebergs,
double
mask_grounded);
43
44
/*!
45
* Label connected components in a mask stored in an array::Scalar.
46
*
47
* This function allocates a copy on rank 0 and so should not be used if that is a
48
* problem.
49
*
50
* @param[in,out] mask mask used to identify components (modified in place)
51
52
* @param[in] identify_icebergs `true` to label blobs not connected to `mask_grounded` 1,
53
* the rest with 0, `false` to assign unique labels to all blobs.
54
* @param[in] mask_grounded value in `mask` that is interpreted as "grounded"
55
*/
56
void
label_components
(array::Scalar &mask,
bool
identify_icebergs,
double
mask_grounded);
57
58
}
// end of namespace pism
59
60
#endif
/* LABEL_COMPONENTS_H */
pism::label_components
void label_components(array::Scalar &mask, petsc::Vec &mask_p0, bool identify_icebergs, double mask_grounded)
Definition:
label_components.cc:29
pism
Definition:
AgeColumnSystem.cc:23
Generated by
1.9.1