From: goll Date: Fri, 16 Dec 2011 14:57:17 +0000 (+0000) Subject: Corrected the refine_and_coarsen_optimize function, the error behaves like N^{-2... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3000ccac8ae56b570ddba758f04073a086f1aa0d;p=dealii-svn.git Corrected the refine_and_coarsen_optimize function, the error behaves like N^{-2*order/dim}, not like N. git-svn-id: https://svn.dealii.org/trunk@24834 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/grid_refinement.cc b/deal.II/source/grid/grid_refinement.cc index 119c70b9f1..4d0dd20bf7 100644 --- a/deal.II/source/grid/grid_refinement.cc +++ b/deal.II/source/grid/grid_refinement.cc @@ -528,7 +528,10 @@ GridRefinement::refine_and_coarsen_optimize (Triangulation &tria, // The first M cells are refined // to minimize the expected error // multiplied with the expected - // number of cells. + // number of cells to the power of + // 2 * expected order of the finite + // element space divided by the dimension + // of the discretized space. // We assume that the error is // decreased by (1-2^(-order)) a_K if the cell // K with error indicator a_K is @@ -537,17 +540,17 @@ GridRefinement::refine_and_coarsen_optimize (Triangulation &tria, // The expected number of cells is // N+(2^d-1)*M (N is the current number // of cells) - double min = ((std::pow(2.,dim)-1)*(1.+M)+N) * (E-s0); + double min =std::pow( ((std::pow(2.,dim)-1)*(1.+M)+N),(double) order/dim) * (E-s0); unsigned int minArg = N-1; for (M=1;M