From 26b6e94584ae6fe976805b9f8ee91d1f74752c55 Mon Sep 17 00:00:00 2001 From: turcksin Date: Fri, 3 May 2013 20:23:03 +0000 Subject: [PATCH] Temporary fix for compress. Ideally all the ::dealii::VectorOperation::unknown will be taken out. git-svn-id: https://svn.dealii.org/trunk@29449 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/lac/trilinos_sparse_matrix.h | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h b/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h index a4a946cf4f..daf89a6c57 100644 --- a/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h @@ -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; -- 2.39.5