From: Martin Kronbichler Date: Sat, 29 Mar 2014 10:00:58 +0000 (+0000) Subject: Fix order of destruction in PreconditionAMG when temporary trilinos_matrix was used... X-Git-Tag: v8.2.0-rc1~663 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94c15e541c27167f49c4108b5be8478fda2965d6;p=dealii.git Fix order of destruction in PreconditionAMG when temporary trilinos_matrix was used for construction. git-svn-id: https://svn.dealii.org/trunk@32705 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/trilinos_precondition.h b/deal.II/include/deal.II/lac/trilinos_precondition.h index eb8747a34d..ba1d6ce23e 100644 --- a/deal.II/include/deal.II/lac/trilinos_precondition.h +++ b/deal.II/include/deal.II/lac/trilinos_precondition.h @@ -1420,6 +1420,11 @@ namespace TrilinosWrappers const char* coarse_type; }; + /** + * Destructor. + */ + ~PreconditionAMG(); + /** * Let Trilinos compute a multilevel hierarchy for the solution of a diff --git a/deal.II/source/lac/trilinos_precondition.cc b/deal.II/source/lac/trilinos_precondition.cc index be35b10663..a526b310d7 100644 --- a/deal.II/source/lac/trilinos_precondition.cc +++ b/deal.II/source/lac/trilinos_precondition.cc @@ -534,6 +534,12 @@ namespace TrilinosWrappers {} + PreconditionAMG::~PreconditionAMG() + { + preconditioner.reset(); + trilinos_matrix.reset(); + } + void PreconditionAMG:: initialize (const SparseMatrix &matrix,