From 9c721acdc42c89ffda2904fa35c9233f031c576f Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Wed, 1 Feb 2017 16:05:42 +0100 Subject: [PATCH] Update method used to nullify Epetra_MultiVectors --- source/lac/trilinos_sparse_matrix.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 7b598a4dc5..c8eaa7f66b 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -2805,27 +2805,37 @@ namespace TrilinosWrappers return_op.vmult = [](Range &tril_dst, const Domain &) { - tril_dst.Scale(0); + const int ierr = tril_dst.PutScalar(0.0); + + AssertThrow (ierr == 0, ExcTrilinosError(ierr)); }; return_op.Tvmult = [](Domain &tril_dst, const Range &) { - tril_dst.Scale(0); + const int ierr = tril_dst.PutScalar(0.0); + + AssertThrow (ierr == 0, ExcTrilinosError(ierr)); }; return_op.inv_vmult = [](Domain &tril_dst, const Range &) { AssertThrow(false, ExcMessage("Cannot compute inverse of null operator")); - tril_dst.Scale(0); + + const int ierr = tril_dst.PutScalar(0.0); + + AssertThrow (ierr == 0, ExcTrilinosError(ierr)); }; return_op.inv_Tvmult = [](Range &tril_dst, const Domain &) { AssertThrow(false, ExcMessage("Cannot compute inverse of null operator")); - tril_dst.Scale(0); + + const int ierr = tril_dst.PutScalar(0.0); + + AssertThrow (ierr == 0, ExcTrilinosError(ierr)); }; return return_op; -- 2.39.5