PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ range()

std::array< double, 2 > pism::array::Array::range ( ) const

Result: min <- min(v[j]), max <- max(v[j]).

PETSc manual correctly says "VecMin and VecMax are collective on Vec" but GlobalMax,GlobalMin are needed, when m_impl->ghosted==true, to get correct values because Vecs created with DACreateLocalVector() are of type VECSEQ and not VECMPI. See src/trypetsc/localVecMax.c.

Definition at line 194 of file Array.cc.

References pism::array::Array::Impl::ghosted, pism::GlobalMax(), pism::GlobalMin(), pism::array::Array::Impl::grid, m_impl, pism::array::max(), pism::array::min(), PISM_CHK, and vec().

Referenced by regrid_impl().