From: kronbichler Date: Tue, 26 Feb 2008 17:50:37 +0000 (+0000) Subject: Changed to ILU preconditioner for pressure mass matrix (before: SSOR) X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69b0aa195770b050d4a5a4d4b153cd02a9532bb2;p=dealii-svn.git Changed to ILU preconditioner for pressure mass matrix (before: SSOR) git-svn-id: https://svn.dealii.org/trunk@15793 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-31/step-31.cc b/deal.II/examples/step-31/step-31.cc index 5ee2283241..ab3e0f6d3b 100644 --- a/deal.II/examples/step-31/step-31.cc +++ b/deal.II/examples/step-31/step-31.cc @@ -932,20 +932,28 @@ void StokesProblem::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 preconditioner; + preconditioner.initialize (system_matrix.block(1,1), + SparseILU::AdditionalData()); - InverseMatrix,PreconditionSSOR<> > + InverseMatrix,SparseILU > m_inverse (system_matrix.block(1,1), preconditioner); // With the Schur complement and