PISM, A Parallel Ice Sheet Model  stable v2.0.4 committed by Constantine Khrulev on 2022-05-25 12:02:27 -0800

◆ relabel()

static void pism::ocean::relabel ( RelabelingType  type,
double  threshold,
IceModelVec2Int mask 
)
static

Re-label components in a mask processed by label_connected_components.

If type is BY_AREA, the biggest one gets the value of 2, all the other ones 1, the background is set to zero.

If type is AREA_THRESHOLD, patches with areas above threshold get the value of 2, all the other ones 1, the background is set to zero.

Definition at line 175 of file PicoGeometry.cc.

References pism::IceModelVec2Int::as_int(), BY_AREA, pism::ParallelSection::check(), pism::ParallelSection::failed(), pism::RuntimeError::formatted(), pism::GlobalSum(), pism::IceModelVec::grid(), pism::k, pism::PointsWithGhosts::next(), PISM_ERROR_LOCATION, pism::IceModelVec::range(), and pism::IceModelVec::set().

Referenced by pism::ocean::PicoGeometry::compute_ice_rises(), and pism::ocean::PicoGeometry::compute_ocean_mask().