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=034b17591c13ce7b763bd864f119bf49e43f2997;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