]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Temporary fix for compress. Ideally all the ::dealii::VectorOperation::unknown will...
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 3 May 2013 20:23:03 +0000 (20:23 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 3 May 2013 20:23:03 +0000 (20:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@29449 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/trilinos_sparse_matrix.h

index a4a946cf4fe676e3703a57b1ca7d588ac3cd374b..daf89a6c57cbd3efd574b9b35bb4dd15795985cf 100644 (file)
@@ -3037,20 +3037,21 @@ namespace TrilinosWrappers
 
     Epetra_CombineMode mode = last_action;
     if (last_action == Zero)
-      {
-        if (operation==::dealii::VectorOperation::add)
-          mode = Add;
-        else if (operation==::dealii::VectorOperation::insert)
-          mode = Insert;
-      }
+    {
+      if ((operation==::dealii::VectorOperation::add) &&
+          (operation==::dealii::VectorOperation::unknown))
+        mode = Add;
+      else if (operation==::dealii::VectorOperation::insert)
+        mode = Insert;
+    }
     else
-      {
-        Assert(
-            ((last_action == Add) && (operation==::dealii::VectorOperation::add))
-            ||
-            ((last_action == Insert) && (operation==::dealii::VectorOperation::insert)),
-            ExcMessage("operation and argument to compress() do not match"));
-      }
+    {
+      Assert(
+          ((last_action == Add) && (operation!=::dealii::VectorOperation::insert))
+          ||
+          ((last_action == Insert) && (operation!=::dealii::VectorOperation::add)),
+          ExcMessage("operation and argument to compress() do not match"));
+    }
 
     // flush buffers
     int 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.