From: bangerth Date: Tue, 6 Mar 2007 21:55:21 +0000 (+0000) Subject: Fix a problem with what happens when we have no polynomial degrees to bump up to... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=955eca4e3c9c37f3063caea78d1735577274615e;p=dealii-svn.git Fix a problem with what happens when we have no polynomial degrees to bump up to any more, and fix a problem with the linear solver. git-svn-id: https://svn.dealii.org/trunk@14542 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-27/step-27.cc b/deal.II/examples/step-27/step-27.cc index 906d45f951..0f306a64a5 100644 --- a/deal.II/examples/step-27/step-27.cc +++ b/deal.II/examples/step-27/step-27.cc @@ -122,7 +122,7 @@ template LaplaceProblem::LaplaceProblem () : dof_handler (triangulation) { - for (unsigned int degree=2; degree<7; ++degree) + for (unsigned int degree=2; degree<8; ++degree) { fe_collection.push_back (FE_Q(degree)); quadrature_collection.push_back (QGauss(degree+2)); @@ -247,7 +247,8 @@ void LaplaceProblem::assemble_system () template void LaplaceProblem::solve () { - SolverControl solver_control (1000, 1e-12); + SolverControl solver_control (system_rhs.size(), + 1e-8*system_rhs.l2_norm()); SolverCG<> cg (solver_control); PreconditionSSOR<> preconditioner; @@ -464,7 +465,9 @@ void LaplaceProblem::refine_grid () for (unsigned int index=0; cell!=endc; ++cell, ++index) if (cell->refine_flag_set() && - (smoothness_indicators(index) > cutoff_smoothness)) + (smoothness_indicators(index) > cutoff_smoothness) + && + !(cell->active_fe_index() == fe_collection.size() - 1)) { cell->clear_refine_flag(); cell->set_active_fe_index (std::min (cell->active_fe_index() + 1, @@ -607,7 +610,7 @@ void LaplaceProblem<2>::create_coarse_grid () template void LaplaceProblem::run () { - for (unsigned int cycle=0; cycle<8; ++cycle) + for (unsigned int cycle=0; cycle<30; ++cycle) { std::cout << "Cycle " << cycle << ':' << std::endl;