Consider the right triangle A(0,0) - B(1,0) - C(0,1).
Define a linear function z = a + (b - a) * x + (c - a) * y, where a, b, and c are its values at points A, B, and C, respectively.
Our goal is to find the fraction of the triangle ABC in where z > 0.
This corresponds to the grounded area fraction if z is the flotation criterion function.
Definition at line 132 of file grounded_cell_fraction.cc.
References pism::RuntimeError::formatted(), intersect_ab(), intersect_ac(), intersect_bc(), invalid(), PISM_ERROR_LOCATION, same(), and triangle_area().
Referenced by compute_grounded_cell_fraction(), and pism::diagnostics::IceAreaFractionFloating::compute_impl().