From 034b17591c13ce7b763bd864f119bf49e43f2997 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 23 Sep 2015 12:55:37 -0500 Subject: [PATCH] Fix a bug with petsc in readwritevector. --- include/deal.II/lac/read_write_vector.templates.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5