From 4e3be4865d0853cb137c728542cbe2175f60263d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 11 Nov 2021 15:06:02 -0700 Subject: [PATCH] Improve an error message. --- source/lac/trilinos_sparse_matrix.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 1b20186c53..9c898a787e 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -1956,10 +1956,17 @@ namespace TrilinosWrappers const TrilinosWrappers::MPI::Vector &out) { Assert(in.trilinos_partitioner().SameAs(m.DomainMap()) == true, - ExcMessage( - "Column map of matrix does not fit with vector map!")); + ExcMessage("The column partitioning of a matrix does not match " + "the partitioning of a vector you are trying to " + "multiply it with. Are you multiplying the " + "matrix with a vector that has ghost elements?")); Assert(out.trilinos_partitioner().SameAs(m.RangeMap()) == true, - ExcMessage("Row map of matrix does not fit with vector map!")); + ExcMessage("The row partitioning of a matrix does not match " + "the partitioning of a vector you are trying to " + "put the result of a matrix-vector product in. " + "Are you trying to put the product of the " + "matrix with a vector into a vector that has " + "ghost elements?")); (void)m; (void)in; (void)out; -- 2.39.5