]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add output section and use same meshes as step-5
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 23 May 2008 15:11:28 +0000 (15:11 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 23 May 2008 15:11:28 +0000 (15:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@16185 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-16/doc/results.dox
deal.II/examples/step-16/step-16.cc

index f4c6feefb5b45452a5c65244ed85a736a8fb7390..b7d1c56414d18f2faa2d2d4adfaad7bb3bea91c5 100644 (file)
@@ -1 +1,43 @@
 <h1>Results</h1>
+
+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:
+<table>
+<tr><th>cells</th><th>step-5</th><th><step-16></th><\tr>
+<tr><td>20</td>   <td>13</td> <td>6</td> </tr>
+<tr><td>80</td>   <td>18</td> <td>8</td> </tr>
+<tr><td>320</td>  <td>29</td> <td>9</td> </tr>
+<tr><td>1280</td> <td>52</td> <td>9</td> </tr>
+<tr><td>5120</td> <td>95</td> <td>9</td> </tr>
+<tr><td>20480</td><td>182</td><td>10</td></tr>
+</table>
+Therefore, whenever possible, mutligrid methods should be used for second order problems.
+
+
+The output produced by this program is the following:
+<pre>
+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
+</pre>
index 91efbaaaa64ff6fa3612f4e44423d20ac5daef18..84e801b6bbbaa87ccff85377f51ca392a0a6d2a0 100644 (file)
@@ -25,6 +25,7 @@
 #include <grid/tria.h>
 #include <grid/tria_accessor.h>
 #include <grid/tria_iterator.h>
+#include <grid/tria_boundary_lib.h>
 #include <grid/grid_generator.h>
 #include <dofs/dof_handler.h>
 #include <dofs/dof_accessor.h>
@@ -544,14 +545,11 @@ void LaplaceProblem<dim>::run ()
       if (cycle == 0)
        {
                                           // Generate a simple hypercube grid.
-         GridGenerator::hyper_cube(triangulation);
-         
+         GridGenerator::hyper_ball(triangulation);
+         static const HyperBallBoundary<dim> 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 ();

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.