From 7395cafc9b8917ad7f08cab50047bd9d0d5f1260 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 3 Apr 2013 16:36:11 +0000 Subject: [PATCH] Add a couple of important points to the documentation. git-svn-id: https://svn.dealii.org/trunk@29163 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-20/doc/intro.dox | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/deal.II/examples/step-20/doc/intro.dox b/deal.II/examples/step-20/doc/intro.dox index 67686b1a15..dd4c3829ca 100644 --- a/deal.II/examples/step-20/doc/intro.dox +++ b/deal.II/examples/step-20/doc/intro.dox @@ -354,7 +354,8 @@ like these. Namely, we will consider the linear system as not consisting of one large matrix and vectors, but we will want to decompose matrices into vectors into blocks that correspond to the individual operators that appear in the system. We note that the resulting solver is not optimal -- there are much -better ways, for example those explained in the results section of step-22 -- +better ways, for example those explained in the results section of step-22 or +the one we use in step-43 for a problem rather similar to the current one -- but that the goal is to introduce techniques rather than optimal solvers. @@ -408,6 +409,17 @@ Note how we evaluate the expression $B^TM^{-1}Bv$ right to left to avoid matrix-matrix products; this way, all we have to do is evaluate matrix-vector products. +@note The key point in this consideration is to recognize that to implement +an iterative solver such as CG or GMRES, we never actually need the actual +elements of a matrix! All that is required is that we can form +matrix-vector products. The same is true for preconditioners. In deal.II +we encode this requirement by only requiring that matrices and preconditioners +given to solver classes have a vmult() member function that does +the matrix-vector product. How a class chooses to implement this function is +not important to the solver. Consequently, classes can implement it by, +for example, doing a sequence of products and linear solves as discussed +above. + Using this strategy, we can then implement a class that provides the function vmult() that is all that the SolverCG class requires from an object representing a matrix. We can make our life a -- 2.39.5