From: Bruno Turcksin Date: Wed, 23 Sep 2015 17:55:37 +0000 (-0500) Subject: Fix a bug with petsc in readwritevector. X-Git-Tag: v8.4.0-rc2~377^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1659%2Fhead;p=dealii.git Fix a bug with petsc in readwritevector. --- diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index 550c772ea8..b8443166ba 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -145,7 +145,7 @@ namespace LinearAlgebra int ierr = VecGetArray (static_cast(petsc_vec), &start_ptr); AssertThrow (ierr == 0, ExcPETScError(ierr)); - const size_type vec_size = local_size(); + const size_type vec_size = petsc_vec.local_size(); internal::copy_petsc_vector (start_ptr, start_ptr + vec_size, begin()); // restore the representation of the vector