<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>
#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>
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 ();