]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Changed to ILU preconditioner for pressure mass matrix (before: SSOR)
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Feb 2008 17:50:37 +0000 (17:50 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Feb 2008 17:50:37 +0000 (17:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@15793 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-31/step-31.cc

index 5ee22832416f3af7fa2632e15a375405e7dc6033..ab3e0f6d3b0fe4055a85ca9cc91b51446af3af9f 100644 (file)
@@ -932,20 +932,28 @@ void StokesProblem<dim>::solve ()
                                     // matrix is a rather cheap and
                                     // straight-forward operation (compared
                                     // to, e.g., a Laplace matrix). The CG
-                                    // method with SSOR preconditioning
-                                    // converges in 10-20 steps,
+                                    // method with ILU preconditioning
+                                    // converges in 5-10 steps,
                                     // independently on the mesh size.  This
                                     // is precisely what we do here: We
-                                    // choose an SSOR preconditioner with
-                                    // parameter 1.2 and take it along to the
+                                    // choose another ILU preconditioner 
+                     // and take it along to the
                                     // InverseMatrix object via the
                                     // corresponding template parameter.  A
                                     // CG solver is then called within the
                                     // vmult operation of the inverse matrix.
-    PreconditionSSOR<> preconditioner;
-    preconditioner.initialize (system_matrix.block(1,1), 1.2);
+                     //
+                     // An alternative that is cheaper to build,
+                     // but needs more iterations afterwards,
+                     // would be to choose a SSOR preconditioner
+                     // with factor 1.2. It needs about twice 
+                     // the number of iterations, but the costs
+                     // for its generation are almost neglible.
+    SparseILU<double> preconditioner;
+    preconditioner.initialize (system_matrix.block(1,1), 
+      SparseILU<double>::AdditionalData());
   
-    InverseMatrix<SparseMatrix<double>,PreconditionSSOR<> >
+    InverseMatrix<SparseMatrix<double>,SparseILU<double> >
       m_inverse (system_matrix.block(1,1), preconditioner);
     
                                     // With the Schur complement and

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.