From: bangerth Date: Mon, 15 Nov 2010 00:37:20 +0000 (+0000) Subject: Document refine_grid. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=640d486f46ed0c8b1cf1178758ee1bb98bb96437;p=dealii-svn.git Document refine_grid. git-svn-id: https://svn.dealii.org/trunk@22731 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-40/step-40.cc b/deal.II/examples/step-40/step-40.cc index c561a2c902..ee8a92bd96 100644 --- a/deal.II/examples/step-40/step-40.cc +++ b/deal.II/examples/step-40/step-40.cc @@ -440,10 +440,9 @@ void LaplaceProblem::solve () // Ask for a symmetric preconditioner by // setting the first parameter in // AdditionalData to true. - PETScWrappers::PreconditionBoomerAMG preconditioner( - system_matrix, - PETScWrappers::PreconditionBoomerAMG::AdditionalData(true) - ); + PETScWrappers::PreconditionBoomerAMG + preconditioner(system_matrix, + PETScWrappers::PreconditionBoomerAMG::AdditionalData(true)); solver.solve (system_matrix, completely_distributed_solution, system_rhs, preconditioner); @@ -458,6 +457,33 @@ void LaplaceProblem::solve () + // @sect4{LaplaceProblem::refine_grid} + + // The function that estimates the + // error and refines the grid is + // again almost exactly like the one + // in step-6. The only difference is + // that the function that flags cells + // to be refined is now in namespace + // parallel::distributed::GridRefinement + // -- a namespace that has functions + // that can communicate between all + // involved processors and determine + // global thresholds to use in + // deciding which cells to refine and + // which to coarsen. + // + // Note that we didn't have to do + // anything special about the + // KellyErrorEstimator class: we just + // give it a vector with as many + // elements as the local + // triangulation has cells (locally + // owned cells, ghost cells, and + // artificial ones), but it only + // fills those entries that + // correspond to cells that are + // locally owned. template void LaplaceProblem::refine_grid () {