From 3d625c92024b0b1e92e7d1be300d52f5e6294696 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 8 Feb 2019 16:40:03 -0600 Subject: [PATCH] Address Martin's comments - 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 | 4 ++-- examples/step-20/doc/results.dox | 35 ++++++++++++++++---------------- examples/step-20/step-20.cc | 8 ++++---- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/examples/step-20/doc/intro.dox b/examples/step-20/doc/intro.dox index f090523b02..2f3209618b 100644 --- a/examples/step-20/doc/intro.dox +++ b/examples/step-20/doc/intro.dox @@ -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 schur_rhs (U.size()); - Vector tmp (P.size()); + Vector schur_rhs (P.size()); + Vector tmp (U.size()); op_M_inv.vmult (tmp, F); transpose_operator(op_B).vmult (schur_rhs, tmp); schur_rhs -= G; diff --git a/examples/step-20/doc/results.dox b/examples/step-20/doc/results.dox index 42dbf45171..85700efea3 100644 --- a/examples/step-20/doc/results.dox +++ b/examples/step-20/doc/results.dox @@ -3,33 +3,34 @@

Output of the program and graphical visualization

-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: - - - + + + diff --git a/examples/step-20/step-20.cc b/examples/step-20/step-20.cc index 7c6d13494e..2c4ef1733f 100644 --- a/examples/step-20/step-20.cc +++ b/examples/step-20/step-20.cc @@ -327,7 +327,7 @@ namespace Step20 void MixedLaplaceProblem::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 op_aS 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; -- 2.39.5