]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix memory consumption.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Sep 2009 06:40:01 +0000 (06:40 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Sep 2009 06:40:01 +0000 (06:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@19412 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-37/doc/results.dox
deal.II/examples/step-37/step-37.cc

index bbb859840bbb1aa9969c92a505ab53d9916ad984..a1ddd0c1c0465e376c74b455a9908d30bb7e4b57 100644 (file)
@@ -9,38 +9,38 @@ output:
 @code
 Cycle 0
 Number of degrees of freedom: 337
-System matrix memory consumption: 0.02232 MBytes.
-Multigrid objects memory consumption: 0.04438 MBytes.
-Convergence in 9 CG iterations.
+System matrix memory consumption: 0.0224 MBytes.
+Multigrid objects memory consumption: 0.04636 MBytes.
+Convergence in 10 CG iterations.
 
 Cycle 1
 Number of degrees of freedom: 1313
-System matrix memory consumption: 0.08101 MBytes.
-Multigrid objects memory consumption: 0.1564 MBytes.
+System matrix memory consumption: 0.08109 MBytes.
+Multigrid objects memory consumption: 0.1635 MBytes.
 Convergence in 10 CG iterations.
 
 Cycle 2
 Number of degrees of freedom: 5185
 System matrix memory consumption: 0.3141 MBytes.
-Multigrid objects memory consumption: 0.5939 MBytes.
+Multigrid objects memory consumption: 0.6208 MBytes.
 Convergence in 10 CG iterations.
 
 Cycle 3
 Number of degrees of freedom: 20609
 System matrix memory consumption: 1.243 MBytes.
-Multigrid objects memory consumption: 2.328 MBytes.
+Multigrid objects memory consumption: 2.434 MBytes.
 Convergence in 10 CG iterations.
 
 Cycle 4
 Number of degrees of freedom: 82177
 System matrix memory consumption: 4.951 MBytes.
-Multigrid objects memory consumption: 9.238 MBytes.
-Convergence in 9 CG iterations.
+Multigrid objects memory consumption: 9.658 MBytes.
+Convergence in 10 CG iterations.
 
 Cycle 5
 Number of degrees of freedom: 328193
 System matrix memory consumption: 19.77 MBytes.
-Multigrid objects memory consumption: 36.83 MBytes.
+Multigrid objects memory consumption: 38.5 MBytes.
 Convergence in 10 CG iterations.
 @endcode
 
@@ -51,33 +51,33 @@ program in three dimensions:
 @code
 Cycle 0
 Number of degrees of freedom: 517
-System matrix memory consumption: 0.09649 MBytes.
-Multigrid objects memory consumption: 0.1389 MBytes.
+System matrix memory consumption: 0.09657 MBytes.
+Multigrid objects memory consumption: 0.1413 MBytes.
 Convergence in 9 CG iterations.
 
 Cycle 1
 Number of degrees of freedom: 3817
-System matrix memory consumption: 0.6333 MBytes.
-Multigrid objects memory consumption: 0.8396 MBytes.
-Convergence in 9 CG iterations.
+System matrix memory consumption: 0.6334 MBytes.
+Multigrid objects memory consumption: 0.8567 MBytes.
+Convergence in 10 CG iterations.
 
 Cycle 2
 Number of degrees of freedom: 29521
 System matrix memory consumption: 4.882 MBytes.
-Multigrid objects memory consumption: 6.273 MBytes.
-Convergence in 9 CG iterations.
+Multigrid objects memory consumption: 6.403 MBytes.
+Convergence in 10 CG iterations.
 
 Cycle 3
 Number of degrees of freedom: 232609
 System matrix memory consumption: 38.68 MBytes.
-Multigrid objects memory consumption: 49.26 MBytes.
-Convergence in 9 CG iterations.
+Multigrid objects memory consumption: 50.28 MBytes.
+Convergence in 11 CG iterations.
 
 Cycle 4
 Number of degrees of freedom: 1847617
 System matrix memory consumption: 308.4 MBytes.
-Multigrid objects memory consumption: 391.5 MBytes.
-Convergence in 9 CG iterations.
+Multigrid objects memory consumption: 399.6 MBytes.
+Convergence in 11 CG iterations.
 @endcode
 
 A comparison of the memory consumption of the MatrixFree class with a 
index 9cee8280a98ad602c4a76ca1e7b3d58459468d53..13903fda7c8075e7952105d866c36f36799742cd 100644 (file)
@@ -736,7 +736,10 @@ MatrixFree<number,Transformation>::el (const unsigned int row,
                                 // matrix, and finally multiply with the
                                 // second basis function. This is exactly
                                 // the value that would be written into the
-                                // diagonal of a sparse matrix.
+                                // diagonal of a sparse matrix. Note that
+                                // we need to condense hanging node
+                                // constraints and set the diagonals to
+                                // one.
 template <typename number, class Transformation>
 void
 MatrixFree<number,Transformation>::calculate_diagonal() const
@@ -782,7 +785,8 @@ std::size_t MatrixFree<number,Transformation>::memory_consumption () const
   std::size_t glob_size = derivatives.memory_consumption() +
     indices_local_to_global.memory_consumption() +
     constraints.memory_consumption() +
-    small_matrix.memory_consumption() + sizeof(*this);
+    small_matrix.memory_consumption() + 
+    diagonal_values.memory_consumption() + sizeof(*this);
   return glob_size;
 }
 
@@ -1420,7 +1424,7 @@ void LaplaceProblem<dim>::run ()
 int main ()
 {
   deallog.depth_console (0);
-  LaplaceProblem<3> laplace_problem (2);
+  LaplaceProblem<2> laplace_problem (2);
   laplace_problem.run ();
 
   return 0;

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.