]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Initialize and check an assertion in the NOX solver. 15238/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 18 May 2023 05:51:55 +0000 (23:51 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 18 May 2023 05:51:55 +0000 (23:51 -0600)
include/deal.II/trilinos/nox.h
include/deal.II/trilinos/nox.templates.h

index 3ca2cc26126290e062fc2e7ff88301fcc0bf9b51..37c5ede1e64db1f96221589753f1d736d1fc6b9a 100644 (file)
@@ -164,6 +164,11 @@ namespace TrilinosWrappers
               const Teuchos::RCP<Teuchos::ParameterList> &parameters =
                 Teuchos::rcp(new Teuchos::ParameterList));
 
+    /**
+     * Destructor.
+     */
+    ~NOXSolver();
+
     /**
      * Clear the internal state.
      */
index 57d8974504356a9b1053d62ce55d2ac7baa67c84..e0a8b690fdbc72b4d1f569b19d8e3eca0e3662d3 100644 (file)
@@ -940,9 +940,17 @@ namespace TrilinosWrappers
     , n_jacobian_applications(0)
     , n_nonlinear_iterations(0)
     , n_last_linear_iterations(0)
+    , pending_exception(nullptr)
   {}
 
 
+  template <typename VectorType>
+  NOXSolver<VectorType>::~NOXSolver()
+  {
+    Assert(pending_exception == nullptr, ExcInternalError());
+  }
+
+
 
   template <typename VectorType>
   void

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.