@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
@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
// 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
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;
}
int main ()
{
deallog.depth_console (0);
- LaplaceProblem<3> laplace_problem (2);
+ LaplaceProblem<2> laplace_problem (2);
laplace_problem.run ();
return 0;