From 58bde20a4b2d788e5547c66a0dfe10d2344271e4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 2 Sep 2009 18:05:22 +0000 Subject: [PATCH] When doing reinit() on a distributed vector, it is not enough to ensure that the local range is the same, but we'd need to make sure that *all* local ranges are the same. We can do so by comparing the Trilinos maps. git-svn-id: https://svn.dealii.org/trunk@19370 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/trilinos_vector.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deal.II/lac/source/trilinos_vector.cc b/deal.II/lac/source/trilinos_vector.cc index 5197e98cb4..b53d8bed25 100755 --- a/deal.II/lac/source/trilinos_vector.cc +++ b/deal.II/lac/source/trilinos_vector.cc @@ -133,7 +133,7 @@ namespace TrilinosWrappers // generate the vector. if (allow_different_maps == false) { - if (local_range() != v.local_range()) + if (vector->Map().SameAs(v.vector->Map()) == false) { vector.reset(); communicator.reset (Utilities::Trilinos:: @@ -147,11 +147,12 @@ namespace TrilinosWrappers } else if (fast == false) { + // old and new vectors + // have exactly the + // same map, i.e. size + // and parallel + // distribution int ierr; - Assert (vector->Map().SameAs(v.vector->Map()) == true, - ExcMessage ("The Epetra maps in the assignment operator =" - " do not match, even though the local_range " - " seems to be the same. Check vector setup!")); ierr = vector->GlobalAssemble (last_action); AssertThrow (ierr == 0, ExcTrilinosError(ierr)); -- 2.39.5