From 70987c937752b4bd8dd7719d3a90b78f77581011 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 26 Feb 2008 17:50:37 +0000 Subject: [PATCH] Changed to ILU preconditioner for pressure mass matrix (before: SSOR) git-svn-id: https://svn.dealii.org/trunk@15793 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-31/step-31.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) 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 -- 2.39.5