From aec748336a1f987d19a922d0fd17cf78f5d4ef78 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 14 Dec 2006 17:03:20 +0000 Subject: [PATCH] Polish testcase a bit. git-svn-id: https://svn.dealii.org/trunk@14241 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-27/step-27.cc | 35 +++++++++-------------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/deal.II/examples/step-27/step-27.cc b/deal.II/examples/step-27/step-27.cc index 8cca3c9577..06fcb387c0 100644 --- a/deal.II/examples/step-27/step-27.cc +++ b/deal.II/examples/step-27/step-27.cc @@ -1769,10 +1769,13 @@ class RightHandSide : public Function template double -RightHandSide::value (const Point &/*p*/, +RightHandSide::value (const Point &p, const unsigned int /*component*/) const { - return 1.; + double product = 1; + for (unsigned int d=0; d &solver, const std::list *> &postprocessor_list) { - // We will give an indicator of the - // step we are presently computing, - // in order to keep the user - // informed that something is still - // happening, and that the program - // is not in an endless loop. This - // is the head of this status line: - std::cout << "Refinement cycle: "; - // Then start a loop which only // terminates once the number of // degrees of freedom is larger @@ -1815,17 +1809,8 @@ run_simulation (LaplaceSolver::Base &solver, // your program). for (unsigned int step=0; true; ++step) { - // Then give the alive - // indication for this - // iteration. Note that the - // std::flush is needed to - // have the text actually - // appear on the screen, rather - // than only in some buffer - // that is only flushed the - // next time we issue an - // end-line. - std::cout << step << " " << std::flush; + std::cout << "Refinement cycle: " + << step << " " << std::endl; // Now solve the problem on the // present grid, and run the @@ -1843,7 +1828,7 @@ run_simulation (LaplaceSolver::Base &solver, { (*i)->set_refinement_cycle (step); solver.postprocess (**i); - }; + } // Now check whether more @@ -1854,7 +1839,9 @@ run_simulation (LaplaceSolver::Base &solver, solver.refine_grid (); else break; - }; + + std::cout << std::endl; + } // Finally end the line in which we // displayed status reports: -- 2.39.5