From: Wolfgang Bangerth Date: Sun, 1 Jun 2014 23:16:02 +0000 (+0000) Subject: Update a comment. Remove confusing output to deallog that just goes to X-Git-Tag: v8.2.0-rc1~431 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81a1f1ef0c192ef9d2e4d3ff8e298869b1b67830;p=dealii.git Update a comment. Remove confusing output to deallog that just goes to /dev/null and that is duplicated to std::cout at a different location. git-svn-id: https://svn.dealii.org/trunk@32998 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-16/step-16.cc b/deal.II/examples/step-16/step-16.cc index e8a2035f0b..32aa7d2bde 100644 --- a/deal.II/examples/step-16/step-16.cc +++ b/deal.II/examples/step-16/step-16.cc @@ -1,7 +1,7 @@ /* --------------------------------------------------------------------- * $Id$ * - * Copyright (C) 2003 - 2013 by the deal.II authors + * Copyright (C) 2003 - 2014 by the deal.II authors * * This file is part of the deal.II library. * @@ -245,21 +245,32 @@ namespace Step16 // The following function extends what the corresponding one in step-6 // did, with the exception of also distributing the degrees of freedom on // each level of the mesh which is needed for the multigrid hierarchy. + // We then output the number of degrees (globally and on each level) and + // reset the solution and right hand side vectors to the correct size. + // As in other programs where we use a sequence of meshes that become + // finer and finer (starting with step-5), the code as is here sets + // the solution vector to zero, rather than trying to interpolate the + // solution obtained on the previous mesh to the current one. This + // follows from the empirical observation that interpolating the solution + // and using it as a starting guess does not significant decrease the number + // of linear CG iterations one has to perform to solve a linear system. + // (The situation is very different for nonlinear problems, where using + // a previous time step's solution, or a solution from a coarser grid, + // typically drastically makes the solution of a nonlinear system cheaper.) template void LaplaceProblem::setup_system () { dof_handler.distribute_dofs (fe); dof_handler.distribute_mg_dofs (fe); - // Here we output not only the degrees of freedom on the finest level, but - // also in the multilevel structure - deallog << "Number of degrees of freedom: " - << dof_handler.n_dofs(); - - for (unsigned int l=0; l