]> https://gitweb.dealii.org/ - dealii.git/commitdiff
When doing reinit() on a distributed vector, it is not enough to ensure that the...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 2 Sep 2009 18:05:22 +0000 (18:05 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 2 Sep 2009 18:05:22 +0000 (18:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@19370 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/trilinos_vector.cc

index 5197e98cb44c0dd1acc569b43f3ba4b9c930af0d..b53d8bed257890b8709954b09bc17c7e585fc08b 100755 (executable)
@@ -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));
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.