PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900

◆ invalid()

bool pism::invalid ( const Point p)

Return true if a point p is not a valid point on a side of the triangle (0,0)-(1,0)-(0,1).

This is not a complete test (for example, it does not check if y = 1 - x for points on the hypotenuse). The point of this is to exclude the kinds of invalid points we are likely to see, not all of them.

Note that we use (-1, -1) to indicate "invalid" points in the rest of the code and these are easy to detect: they require only one comparison.

Definition at line 109 of file grounded_cell_fraction.cc.

References pism::Point::x, and pism::Point::y.

Referenced by grounded_area_fraction().