From dcc65c85a1d801b2cde7ffb0825da87b7e663330 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Fri, 13 Mar 2015 09:36:32 +0100 Subject: [PATCH] Fix call to compress in reinit of Trilinos sparse matrix --- source/lac/trilinos_sparse_matrix.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 01b51235e6..2c464c1ead 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -788,8 +788,8 @@ namespace TrilinosWrappers else nonlocal_matrix.reset (); - compress(VectorOperation::insert); last_action = Zero; + compress(VectorOperation::insert); } @@ -805,12 +805,14 @@ namespace TrilinosWrappers nonlocal_matrix_exporter.reset(); matrix.reset (new Epetra_FECrsMatrix (Copy, sparse_matrix.trilinos_sparsity_pattern(), false)); + if (sparse_matrix.nonlocal_matrix != 0) nonlocal_matrix.reset (new Epetra_CrsMatrix (Copy, sparse_matrix.nonlocal_matrix->Graph())); else nonlocal_matrix.reset(); + last_action = Zero; compress(VectorOperation::insert); } -- 2.39.5