From 22a26eecd01e62f4963306cd9f92357a025e68ef Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 26 Nov 2010 14:43:55 +0000 Subject: [PATCH] Trilinos vector reinit should now be safe also with MPI. git-svn-id: https://svn.dealii.org/trunk@22862 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/lac/trilinos_sparse_matrix.h | 37 ++++++++----------- 1 file changed, 15 insertions(+), 22 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 569bcdbaa7..b173f7dc2b 100644 --- a/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/trilinos_sparse_matrix.h @@ -2108,29 +2108,24 @@ namespace TrilinosWrappers /** * Print the matrix to the given * stream, using the format - * (line,col) value, - * i.e. one nonzero entry of the - * matrix per line. The optional flag - * outputs the sparsity pattern in - * Trilinos style, where even the - * according processor number is - * printed to the stream, as well as - * a summary before actually writing - * the entries. + * (line,col) value, i.e. one + * nonzero entry of the matrix per + * line. The optional flag outputs the + * sparsity pattern in Trilinos style, + * where the data is sorted according + * to the processor number when printed + * to the stream, as well as a summary + * of the matrix like the global size. */ void print (std::ostream &out, const bool write_extended_trilinos_info = false) const; - // TODO: Write an overloading - // of the operator << for output. - // Since the underlying Trilinos - // object supports it, this should - // be very easy. - //@} - /** @addtogroup Exceptions - * @{ */ - /** +/** @addtogroup Exceptions + * + */ +//@{ + /** * Exception */ DeclException1 (ExcTrilinosError, @@ -2176,7 +2171,7 @@ namespace TrilinosWrappers << "/" << arg2 << ")" << " of a sparse matrix, but it appears to not" << " exist in the Trilinos sparsity pattern."); - //@} +//@} @@ -3231,9 +3226,7 @@ namespace TrilinosWrappers // the content -- this is what we need // since we're going to overwrite that // anyway in the vmult operation. - // TODO[TH]: workaround, because fast is - // not reliable with MPI right now. - temp_vector.reinit(dst, false); + temp_vector.reinit(dst, true); vmult (temp_vector, src); dst += temp_vector; -- 2.39.5