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

◆ copy_to_vec()

void pism::array::Array::copy_to_vec ( std::shared_ptr< petsc::DM destination_da,
petsc::Vec destination 
) const
protected

Copies v to a global vector 'destination'. Ghost points are discarded.

This is potentially dangerous: make sure that destination has the same dimensions as the current Array.

DMLocalToGlobalBegin/End is broken in PETSc 3.5, so we roll our own.

Definition at line 267 of file Array.cc.

References pism::array::Array::Impl::dof, get_dof(), m_impl, pism::array::max(), and pism::array::Array::Impl::zlevels.

Referenced by put_on_proc0(), and write_impl().