20 #ifndef PISM_ARRAY_CELLTYPE_H
21 #define PISM_ARRAY_CELLTYPE_H
23 #include "pism/util/array/Scalar.hh"
24 #include "pism/util/Mask.hh"
32 CellType(std::shared_ptr<const Grid>
grid,
const std::string &name);
34 inline bool ocean(
int i,
int j)
const {
42 inline bool icy(
int i,
int j)
const {
66 CellType(std::shared_ptr<const Grid>
grid,
const std::string &name,
int w);
74 CellType1(std::shared_ptr<const Grid>
grid,
const std::string &name);
88 return (
icy(i + 1, j) or
icy(i - 1, j) or
icy(i, j + 1) or
icy(i, j - 1));
111 CellType1(std::shared_ptr<const Grid>
grid,
const std::string &name,
int width);
119 CellType2(std::shared_ptr<const Grid>
grid,
const std::string &name);
A storage vector combining related fields in a struct.
std::shared_ptr< const Grid > grid() const
CellType1(std::shared_ptr< const Grid > grid, const std::string &name)
bool next_to_ice(int i, int j) const
Ice-free margin (at least one of four neighbors has ice).
bool ice_margin(int i, int j) const
Ice margin (ice-filled with at least one of four neighbors ice-free).
bool next_to_ice_free_land(int i, int j) const
bool next_to_grounded_ice(int i, int j) const
bool next_to_floating_ice(int i, int j) const
bool next_to_ice_free_ocean(int i, int j) const
CellType2(std::shared_ptr< const Grid > grid, const std::string &name)
bool ice_free(int i, int j) const
bool floating_ice(int i, int j) const
bool ice_free_ocean(int i, int j) const
bool grounded_ice(int i, int j) const
CellType(std::shared_ptr< const Grid > grid, const std::string &name)
bool ocean(int i, int j) const
bool grounded(int i, int j) const
bool ice_free_land(int i, int j) const
bool icy(int i, int j) const
"Cell type" mask. Adds convenience methods to array::Scalar.
int as_int(int i, int j) const
stencils::Box< int > box_int(int i, int j) const
stencils::Star< int > star_int(int i, int j) const
bool icy(int M)
Ice-filled cell (grounded or floating).
bool ice_free_land(int M)
bool ice_free_ocean(int M)
bool grounded(int M)
Grounded cell (grounded ice or ice-free).
bool ice_free(int M)
Ice-free cell (grounded or ocean).
bool ocean(int M)
An ocean cell (floating ice or ice-free).