From: schrage Date: Mon, 7 Jun 1999 13:53:33 +0000 (+0000) Subject: Added preconditioner. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ce909aef2460809850429434c42dfcb329a54f1;p=dealii-svn.git Added preconditioner. git-svn-id: https://svn.dealii.org/trunk@1375 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-1.elements/solve.html b/deal.II/doc/tutorial/chapter-1.elements/solve.html index 27b55543f4..73619fc876 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/solve.html +++ b/deal.II/doc/tutorial/chapter-1.elements/solve.html @@ -44,12 +44,15 @@ Besides, there is a class named SolverControl in order to control the iterative solvers, i.e. to determine whether the iteration -should be continued. +should be continued and a class named +PreconditionSelector that allows +you to select a preconditioner.

We will begin with the discussion of the SolverControl -class and preconditioners, then discuss the solvers in more detail. +and the PreconditionSelector classes, then discuss the solvers +in more detail.

Solver Control

@@ -76,6 +79,61 @@ SolverControl control(1000,1e-6); +

Preconditioning

+ +

+Before firing up the solver of your choice you will need some kind of +preconditioning. This is easiest selected by creating an instance of +the PreconditionSelect class with an appropriate choice of +parameters. This can be done using PreconditionSelector(const string +preconditioning, const typename Vector::value_type &omega=1.) +where preconditioning denotes the preconditioning method used +and omega is the damping parameter. +

+

+The preconditioning methods currently available using this class are +

+ +

+You can obtain a list of available methods by calling +string PreconditionSelector::get_precondition_names(). +

+ +

+After having selected a preconditioner you will need to select a +matrix used for preconditioning. Usually this will be the problem matrix +A of the problem Au=f. +The method to be called is void PreconditionSelector::use_matrix(const +Matrix &M). +

+ +

+Example:We initialize a Jacobi preconditioner +with a damping parameter of 1. The matrix used for preconditioning +is the matrix A +of the problem Au=f. +

+ +
+
+#include <lac/precondition_selector.h>
+#include <grid/dof.h>
+#include <lac/fullmatrix.h>
+
+FullMatrix<double> A(100,50);
+
+PreconditionSelector preconditioning("jacobi",1.);
+preconditioning.use_matrix(A);
+
+
+ + +

SolverBicgstab