]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix order of destruction in PreconditionAMG when temporary trilinos_matrix was used...
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sat, 29 Mar 2014 10:00:58 +0000 (10:00 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sat, 29 Mar 2014 10:00:58 +0000 (10:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@32705 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/trilinos_precondition.h
deal.II/source/lac/trilinos_precondition.cc

index eb8747a34de3c12e9c91b8b7033d710a50d0b96d..ba1d6ce23ec67dac146352e672d3fcbd6af09abb 100644 (file)
@@ -1420,6 +1420,11 @@ namespace TrilinosWrappers
       const char* coarse_type;
     };
 
+    /**
+     * Destructor.
+     */
+    ~PreconditionAMG();
+
 
     /**
      * Let Trilinos compute a multilevel hierarchy for the solution of a
index be35b106638acc08ece69e42870509160172f4fb..a526b310d76fe851b2fb523f3f5e1b571854f288 100644 (file)
@@ -534,6 +534,12 @@ namespace TrilinosWrappers
   {}
 
 
+  PreconditionAMG::~PreconditionAMG()
+  {
+    preconditioner.reset();
+    trilinos_matrix.reset();
+  }
+
 
   void
   PreconditionAMG:: initialize (const SparseMatrix   &matrix,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.