]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix the big big memory leak and thereby remove the failing assertion
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 14 Dec 1999 08:50:43 +0000 (08:50 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 14 Dec 1999 08:50:43 +0000 (08:50 +0000)
at the end of the program.

git-svn-id: https://svn.dealii.org/trunk@2061 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/Attic/examples/convergence/convergence.cc
tests/big-tests/convergence/convergence.cc

index 40ec20423fc59ce3a0fa0079334ad8a862545207..3c06838402319238c3bf3eda45e5aae46bff4482 100644 (file)
@@ -2,6 +2,7 @@
 /* Copyright W. Bangerth, University of Heidelberg, 1998 */
 
 
+#include <base/logstream.h>
 #include <grid/tria.h>
 #include <grid/tria_accessor.h>
 #include <grid/tria_iterator.h>
@@ -61,7 +62,8 @@ template <int dim>
 class PoissonProblem : public ProblemBase<dim> {
   public:
     PoissonProblem (unsigned int order);
-
+    ~PoissonProblem ();
+    
     void clear ();
     void create_new ();
     int run (unsigned int level);
@@ -206,6 +208,12 @@ PoissonProblem<dim>::PoissonProblem (unsigned int order) :
                boundary_values(0), order(order) {};
 
 
+template <int dim>
+PoissonProblem<dim>::~PoissonProblem () 
+{
+  clear ();
+};
+
 
 
 template <int dim>
@@ -497,6 +505,7 @@ void PoissonProblem<dim>::print_history (string filename) const {
 
 
 int main () {
+  deallog.depth_console (0);
   for (unsigned int order=0; order<5; ++order) 
     {
       PoissonProblem<2> problem (order);
index 40ec20423fc59ce3a0fa0079334ad8a862545207..3c06838402319238c3bf3eda45e5aae46bff4482 100644 (file)
@@ -2,6 +2,7 @@
 /* Copyright W. Bangerth, University of Heidelberg, 1998 */
 
 
+#include <base/logstream.h>
 #include <grid/tria.h>
 #include <grid/tria_accessor.h>
 #include <grid/tria_iterator.h>
@@ -61,7 +62,8 @@ template <int dim>
 class PoissonProblem : public ProblemBase<dim> {
   public:
     PoissonProblem (unsigned int order);
-
+    ~PoissonProblem ();
+    
     void clear ();
     void create_new ();
     int run (unsigned int level);
@@ -206,6 +208,12 @@ PoissonProblem<dim>::PoissonProblem (unsigned int order) :
                boundary_values(0), order(order) {};
 
 
+template <int dim>
+PoissonProblem<dim>::~PoissonProblem () 
+{
+  clear ();
+};
+
 
 
 template <int dim>
@@ -497,6 +505,7 @@ void PoissonProblem<dim>::print_history (string filename) const {
 
 
 int main () {
+  deallog.depth_console (0);
   for (unsigned int order=0; order<5; ++order) 
     {
       PoissonProblem<2> problem (order);

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.