From: 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-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=073734dead5052a8088829ad99e2b0c925e40887;p=dealii-svn.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,