21 #include "pism/util/Mask.hh"
22 #include "pism/util/Grid.hh"
23 #include "pism/util/array/Scalar.hh"
49 for (
auto p = grid.
points(stencil); p; p.
next()) {
50 const int i = p.i(), j = p.j();
52 result(i,j) = this->
mask(sea_level(i, j), bed(i, j), thickness(i, j));
69 for (
auto p = grid.
points(stencil); p; p.
next()) {
70 const int i = p.i(), j = p.j();
72 result(i,j) = this->
surface(sea_level(i, j), bed(i, j), thickness(i, j));
void compute_mask(const array::Scalar &sea_level, const array::Scalar &bed, const array::Scalar &thickness, array::Scalar &result) const
int mask(double sea_level, double bed, double thickness) const
double surface(double sea_level, double bed, double thickness) const
void compute(const array::Scalar &sea_level, const array::Scalar &bed, const array::Scalar &thickness, array::Scalar &out_mask, array::Scalar &out_surface) const
void compute_surface(const array::Scalar &sea_level, const array::Scalar &bed, const array::Scalar &thickness, array::Scalar &result) const
PointsWithGhosts points(unsigned int stencil_width=0) const
Describes the PISM grid and the distribution of data across processors.
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
std::shared_ptr< const Grid > grid() const
unsigned int stencil_width() const
Get the stencil width of the current Array. Returns 0 if ghosts are not available.