]> https://gitweb.dealii.org/ - dealii.git/commitdiff
check Trilinos compress() argument 5538/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 27 Nov 2017 17:04:38 +0000 (12:04 -0500)
committerTimo Heister <timo.heister@gmail.com>
Mon, 27 Nov 2017 17:04:38 +0000 (12:04 -0500)
source/lac/trilinos_vector.cc

index d566f9863c8fe9f2843103e2a1d70df091aefebd..db03f38913677e74522f6068b0647776ba05fe67 100644 (file)
@@ -547,6 +547,15 @@ namespace TrilinosWrappers
           else if (given_last_action==::dealii::VectorOperation::insert)
             mode = Insert;
         }
+      else
+        {
+          Assert(
+            ((last_action == Add) && (given_last_action==::dealii::VectorOperation::add))
+            ||
+            ((last_action == Insert) && (given_last_action==::dealii::VectorOperation::insert)),
+            ExcMessage("The last operation on the Vector and the given last action in the compress() call do not agree!"));
+        }
+
 
 #ifdef DEBUG
 #  ifdef DEAL_II_WITH_MPI

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.