From: kronbichler Date: Wed, 2 Sep 2009 13:18:25 +0000 (+0000) Subject: Improve documentation. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8474bbefd68b1f2e38b58620ee643fc9a8953c0c;p=dealii-svn.git Improve documentation. git-svn-id: https://svn.dealii.org/trunk@19366 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-37/doc/results.dox b/deal.II/examples/step-37/doc/results.dox index 34b10f53c9..bbb859840b 100644 --- a/deal.II/examples/step-37/doc/results.dox +++ b/deal.II/examples/step-37/doc/results.dox @@ -11,25 +11,25 @@ Cycle 0 Number of degrees of freedom: 337 System matrix memory consumption: 0.02232 MBytes. Multigrid objects memory consumption: 0.04438 MBytes. -Convergence in 8 CG iterations. +Convergence in 9 CG iterations. Cycle 1 Number of degrees of freedom: 1313 System matrix memory consumption: 0.08101 MBytes. Multigrid objects memory consumption: 0.1564 MBytes. -Convergence in 9 CG iterations. +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. -Convergence in 9 CG iterations. +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. -Convergence in 9 CG iterations. +Convergence in 10 CG iterations. Cycle 4 Number of degrees of freedom: 82177 @@ -41,7 +41,7 @@ Cycle 5 Number of degrees of freedom: 328193 System matrix memory consumption: 19.77 MBytes. Multigrid objects memory consumption: 36.83 MBytes. -Convergence in 9 CG iterations. +Convergence in 10 CG iterations. @endcode As in step-16, we see that the number of CG iterations stays constant with @@ -53,13 +53,13 @@ Cycle 0 Number of degrees of freedom: 517 System matrix memory consumption: 0.09649 MBytes. Multigrid objects memory consumption: 0.1389 MBytes. -Convergence in 7 CG iterations. +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 8 CG iterations. +Convergence in 9 CG iterations. Cycle 2 Number of degrees of freedom: 29521 @@ -71,15 +71,18 @@ Cycle 3 Number of degrees of freedom: 232609 System matrix memory consumption: 38.68 MBytes. Multigrid objects memory consumption: 49.26 MBytes. -Convergence in 10 CG iterations. +Convergence in 9 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 11 CG iterations. +Convergence in 9 CG iterations. @endcode -We observe a slight increase in the number of CG iterations, but also for the -largest size with almost two million unknowns, the iteration count is still -very modest. +A comparison of the memory consumption of the MatrixFree class with a +standard SparseMatrix object shows that, for the largest problem considered +in 3D, the memory consumption for SparseMatrix and its sparsity pattern +would be about 1.3 GBytes, which is a factor of 4 more memory. If combined +with cubic elements in 3D, the MatrixFree class would decrease memory +consumption by a factor of 12. diff --git a/deal.II/examples/step-37/step-37.cc b/deal.II/examples/step-37/step-37.cc index 34dadb24e2..5184a84981 100644 --- a/deal.II/examples/step-37/step-37.cc +++ b/deal.II/examples/step-37/step-37.cc @@ -182,21 +182,21 @@ public: std::size_t memory_consumption () const; // The private member variables of the - // MatrixFree class are a small matrix that - // does the transformation from solution - // values to quadrature points, a list with - // the mapping between local degrees of - // freedom and global degrees of freedom - // for each cell (stored as a - // two-dimensional array, where the each - // row corresponds to one cell, and the - // columns within individual cells are the - // local degrees of freedom), the - // transformation variable for implementing - // derivatives, a constraint matrix for - // handling boundary conditions as well as - // a few other variables that store matrix - // properties. + // MatrixFree class are a + // small matrix that does the + // transformation from solution values to + // quadrature points, a list with the + // mapping between local degrees of freedom + // and global degrees of freedom for each + // cell (stored as a two-dimensional array, + // where the each row corresponds to one + // cell, and the columns within individual + // cells are the local degrees of freedom), + // the transformation variable for + // implementing derivatives, a constraint + // matrix for handling boundary conditions + // as well as a few other variables that + // store matrix properties. private: template void vmult_on_subrange (const unsigned int first_cell, @@ -288,9 +288,9 @@ reinit (const unsigned int n_dofs_in, // This function we need if we want to // delete the content of the matrix, - // e.g. when are finished with one grid + // e.g. when we are finished with one grid // level and continue to the next one. Just - // let all fields have size 0. + // put all fields sizes to 0. template void MatrixFree::clear () @@ -1268,10 +1268,11 @@ void LaplaceProblem::solve () // order elements, since smoothing gets // more difficult then. Smooth out a // range of - // $[\lambda_{\max}/8,\lambda_{\max}]$. + // $[\lambda_{\max}/10,\lambda_{\max}]$. typename SMOOTHER::AdditionalData smoother_data; - smoother_data.smoothing_range = 8.; - smoother_data.degree = 3; + smoother_data.smoothing_range = 10.; + smoother_data.degree = fe.degree+1; + smoother_data.eig_cg_n_iterations = 4+2*fe.degree; mg_smoother.initialize(mg_matrices, smoother_data); MGMatrix > @@ -1371,7 +1372,7 @@ void LaplaceProblem::run () }; } - + int main () { diff --git a/deal.II/lac/include/lac/precondition.h b/deal.II/lac/include/lac/precondition.h index dd97d3b064..37f161bd5c 100644 --- a/deal.II/lac/include/lac/precondition.h +++ b/deal.II/lac/include/lac/precondition.h @@ -1608,7 +1608,7 @@ PreconditionChebyshev::initialize (const MATRIX &matrix, max_eigenvalue = T.eigenvalue(T.n()-1); } - const double beta = 1.1 * max_eigenvalue; + const double beta = 1.2 * max_eigenvalue; const double alpha = (data.smoothing_range > 0 ? max_eigenvalue / data.smoothing_range : max_eigenvalue / min_eigenvalue);