From: kanschat Date: Fri, 23 May 2008 15:11:28 +0000 (+0000) Subject: add output section and use same meshes as step-5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35c71f4b6f1094781409a98851899e58556adc7e;p=dealii-svn.git add output section and use same meshes as step-5 git-svn-id: https://svn.dealii.org/trunk@16185 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-16/doc/results.dox b/deal.II/examples/step-16/doc/results.dox index f4c6feefb5..b7d1c56414 100644 --- a/deal.II/examples/step-16/doc/results.dox +++ b/deal.II/examples/step-16/doc/results.dox @@ -1 +1,43 @@

Results

+ +Since this example solves the same problem as @ref step_5 "step-5", we +refer to the graphical output there. The only difference between the two is the solver. Let us compare the iteration steps needed to obtain convergence for the two methods: + +<\tr> + + + + + + +
cellsstep-5
20 13 6
80 18 8
320 29 9
1280 52 9
5120 95 9
2048018210
+Therefore, whenever possible, mutligrid methods should be used for second order problems. + + +The output produced by this program is the following: +
+DEAL::Cycle 0
+DEAL::Number of degrees of freedom: 25   L0: 8   L1: 25
+DEAL:cg::Starting value 0.486247
+DEAL:cg::Convergence step 6 value 9.08594e-16
+DEAL::Cycle 1
+DEAL::Number of degrees of freedom: 89   L0: 8   L1: 25   L2: 89
+DEAL:cg::Starting value 0.321015
+DEAL:cg::Convergence step 8 value 2.13127e-13
+DEAL::Cycle 2
+DEAL::Number of degrees of freedom: 337   L0: 8   L1: 25   L2: 89   L3: 337
+DEAL:cg::Starting value 0.182585
+DEAL:cg::Convergence step 9 value 6.84845e-14
+DEAL::Cycle 3
+DEAL::Number of degrees of freedom: 1313   L0: 8   L1: 25   L2: 89   L3: 337   L4: 1313
+DEAL:cg::Starting value 0.0970681
+DEAL:cg::Convergence step 9 value 2.34606e-13
+DEAL::Cycle 4
+DEAL::Number of degrees of freedom: 5185   L0: 8   L1: 25   L2: 89   L3: 337   L4: 1313   L5: 5185
+DEAL:cg::Starting value 0.0500007
+DEAL:cg::Convergence step 9 value 7.22130e-13
+DEAL::Cycle 5
+DEAL::Number of degrees of freedom: 20609   L0: 8   L1: 25   L2: 89   L3: 337   L4: 1313   L5: 5185   L6: 20609
+DEAL:cg::Starting value 0.0253688
+DEAL:cg::Convergence step 10 value 9.41828e-14
+
diff --git a/deal.II/examples/step-16/step-16.cc b/deal.II/examples/step-16/step-16.cc index 91efbaaaa6..84e801b6bb 100644 --- a/deal.II/examples/step-16/step-16.cc +++ b/deal.II/examples/step-16/step-16.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -544,14 +545,11 @@ void LaplaceProblem::run () if (cycle == 0) { // Generate a simple hypercube grid. - GridGenerator::hyper_cube(triangulation); - + GridGenerator::hyper_ball(triangulation); + static const HyperBallBoundary boundary; + triangulation.set_boundary (0, boundary); } - // If this is not the first - // cycle, then simply refine - // the grid once globally. - else - triangulation.refine_global (1); + triangulation.refine_global (1); setup_system (); assemble_system (); assemble_multigrid ();