From 691f69115046218b0faa6541404aa2839d9ae0c6 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 27 Nov 2017 12:04:38 -0500 Subject: [PATCH] check Trilinos compress() argument --- source/lac/trilinos_vector.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index d566f9863c..db03f38913 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -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 -- 2.39.5