]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Address Martin's comments
authorMatthias Maier <tamiko@43-1.org>
Fri, 8 Feb 2019 22:40:03 +0000 (16:40 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 12 Feb 2019 00:46:56 +0000 (18:46 -0600)
 - Change preconditioner reduction to a relative tolerance of 10^-3

 - Increase initial resolution to 5 global refinement steps

 - Update results section to reflect changes

examples/step-20/doc/intro.dox
examples/step-20/doc/results.dox
examples/step-20/step-20.cc

index f090523b020d09f4442025d7cbb35e1466a41342..2f3209618b80a353cd32d2c0df67ca94f2bc7161 100644 (file)
@@ -554,8 +554,8 @@ complement matrix and the mass matrix, respectively. For example the right
 hand side of the first equation reads $B^TM^{-1}F-G$. This could be
 implemented as follows:
 @code
-    Vector<double> schur_rhs (U.size());
-    Vector<double> tmp (P.size());
+    Vector<double> schur_rhs (P.size());
+    Vector<double> tmp (U.size());
     op_M_inv.vmult (tmp, F);
     transpose_operator(op_B).vmult (schur_rhs, tmp);
     schur_rhs -= G;
index 42dbf451712764fed71d4c3aa12c475f3a44afec..85700efea3e63c997c0bc0460389bfeff04157d6 100644 (file)
@@ -3,33 +3,34 @@
 <h3>Output of the program and graphical visualization</h3>
 
 
-If we run the program as is, we get this output for the $8\times 8$
-mesh we use (for a total of 64 cells with 64 pressure degrees of
-freedom since we use piecewise constants, and 144 velocities because
+If we run the program as is, we get this output for the $32\times 32$
+mesh we use (for a total of 1024 cells with 1024 pressure degrees of
+freedom since we use piecewise constants, and 2112 velocities because
 the Raviart-Thomas element defines one degree per freedom per face and
-there are 72 faces parallel to the $x$-axis and the same number
-parallel to the $y$-axis):
+there are $1024 + 32 = 1056$ faces parallel to the $x$-axis and the same
+number parallel to the $y$-axis):
 @verbatim
 \$ make run
 [ 66%] Built target \step-20
 Scanning dependencies of target run
 [100%] Run \step-20 with Release configuration
-Number of active cells: 64
-Total number of cells: 85
-Number of degrees of freedom: 208 (144+64)
-15 CG Schur complement iterations to obtain convergence.
-Errors: ||e_p||_L2 = 0.178055,   ||e_u||_L2 = 0.0433435
+Number of active cells: 1024
+Total number of cells: 1365
+Number of degrees of freedom: 3136 (2112+1024)
+24 CG Schur complement iterations to obtain convergence.
+Errors: ||e_p||_L2 = 0.0445032,   ||e_u||_L2 = 0.010826
 [100%] Built target run
 @endverbatim
 
-The fact that the number of iterations is so small, of course, is due to good
-(but expensive!) preconditioner we have developed. To get confidence in the
-solution, let us take a look at it. The following three images show (from left
-to right) the x-velocity, the y-velocity, and the pressure:
+The fact that the number of iterations is so small, of course, is due to
+the good (but expensive!) preconditioner we have developed. To get
+confidence in the solution, let us take a look at it. The following three
+images show (from left to right) the x-velocity, the y-velocity, and the
+pressure:
 
-<img src="https://www.dealii.org/images/steps/developer/step-20.u.png" alt="">
-<img src="https://www.dealii.org/images/steps/developer/step-20.v.png" alt="">
-<img src="https://www.dealii.org/images/steps/developer/step-20.p.png" alt="">
+<img src="https://www.dealii.org/images/steps/developer/step-20.u_new.jpg" alt="">
+<img src="https://www.dealii.org/images/steps/developer/step-20.v_new.jpg" alt="">
+<img src="https://www.dealii.org/images/steps/developer/step-20.p_new.jpg" alt="">
 
 
 
index 7c6d13494ecbaa797792b6e210549eb683505e06..2c4ef1733f0239509993fdf8e93c637f02578a08 100644 (file)
@@ -327,7 +327,7 @@ namespace Step20
   void MixedLaplaceProblem<dim>::make_grid_and_dofs()
   {
     GridGenerator::hyper_cube(triangulation, -1, 1);
-    triangulation.refine_global(3);
+    triangulation.refine_global(5);
 
     dof_handler.distribute_dofs(fe);
 
@@ -615,9 +615,9 @@ namespace Step20
       transpose_operator(op_B) * linear_operator(preconditioner_M) * op_B;
 
     // We now create a preconditioner out of <code>op_aS</code> that
-    // applies a few number of CG iterations (until a very modest relative
-    // reduction of $10^{-16}$ is reached):
-    ReductionControl     reduction_control_aS(2000, 1.e-18, 1.0e-6);
+    // applies a few CG iterations (until a very modest relative reduction
+    // of $10^{-3}$ is reached):
+    ReductionControl     reduction_control_aS(2000, 1.e-18, 1.0e-3);
     SolverCG<>           solver_aS(reduction_control_aS);
     PreconditionIdentity preconditioner_aS;
 

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.