From: schrage Date: Wed, 5 May 1999 17:18:43 +0000 (+0000) Subject: Bicgstab X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48701379262a396a8a0183c6812786312038372b;p=dealii-svn.git Bicgstab git-svn-id: https://svn.dealii.org/trunk@1279 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 f37ac2df6c..a8dde4a6e6 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/solve.html +++ b/deal.II/doc/tutorial/chapter-1.elements/solve.html @@ -70,7 +70,7 @@ a maximum of 1000 iterations and a maximum residual of 1e-6.
 
-#include 
+#include <lac/solver_control.h>
 
 SolverControl control(1000,1e-6);
 
@@ -85,11 +85,40 @@ It is initialized by

Example:We initialize a Bicgstab-solver for -the problem Au=f. +the problem Au=f, using the solver control +explained above. A shall be a spare matrix and the vectors +u and f shall be vectors of doubles. Next, +we solve the problem.

 
+// Include files for solver control, solver and preconditioner
+#include <lac/solver_control.h>
+#include <lac/solver_bicgstab.h>
+#include <lac/precondition.h>
+
+// Include files for matrices and vectors
+#include <lac/sparsematrix.h>
+#include <lac/vector.h>
+
+// Initialize the solver control and the solver
+
+SolverControl control(1000,1e-6);
+VectorMemory<Vector<double> > vectormem;
+SolverBicgstab<SparseMatrix,Vector<double> > solver(control,vectormem);
+
+// Initialize the problem matrices. Well...they shouldn't only be
+// initialized but also contain the problem, so this is just an example
+// to get the definitions and types and everything right. 
+// To make it clear: This code as it is will not do anything because
+// it does not contain any mathematical problem ! 
+
+SparseMatrix<double> A;
+Vector<double> u,f;
+// NEED TO DEFINE A PRECONDITIONER
+
+solver.solve(A,u,f,precondition);