12.07.2015 Views

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, WellsTo change the default preconditioner in the <strong>DOLFIN</strong> GMRES solver, edit theconstructor of the GMRES class. For example, to choose the ILU preconditionerfor GMRES we writePC pc;KSPGetPC(ksp, &pc);PCSetType(pc, PCILU);As a complement to the preconditioners available in PETSc, <strong>DOLFIN</strong> alsouses Hypre [3], which is a library for solving large, sparse linear systems ofequations on massively parallel computers.To use a preconditioner from Hypre together with a PETSc solver in <strong>DOLFIN</strong>,we write:PCSetType(pc, PCHYPRE );PCHYPRESetType(pc,"boomeramg");In particular, the above preconditioner boomeramg is an algebraic multigridpreconditioner, which is very useful.28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!