Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages

◆ 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 238 of file Array.cc.

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

Referenced by put_on_proc0(), and write_impl().