]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use SSOR as preconditioner.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Mar 2013 03:20:45 +0000 (03:20 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Mar 2013 03:20:45 +0000 (03:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@28948 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 91de3ff1a38d35b978e7ce933d699a1f46ce25d6..39d037c00f75f369b112b0e59a36e6d528eb1eae 100644 (file)
@@ -188,7 +188,10 @@ namespace Step26
     SolverControl solver_control(1000, 1e-8 * system_rhs.l2_norm());
     SolverCG<> cg(solver_control);
 
-    cg.solve(matrix_u, solution_u, system_rhs, PreconditionIdentity());
+    PreconditionSSOR<> preconditioner;
+    preconditioner.initialize(matrix_u, 1.0);
+
+    cg.solve(matrix_u, solution_u, system_rhs, preconditioner);
 
     std::cout << "   u-equation: " << solver_control.last_step()
               << " CG iterations." << std::endl;

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.