next up previous contents
Next: Subdomain sequence Up: Local Solves Previous: Local Solves

Example

The user can determine what method to take here by specifying it as follows:
  PC the_pc; /* the parallel preconditioner */
  {
    PC local_pc; /* a pointer to the local solver */
    ierr = PCParallelGetLocalPC(the_pc,&local_pc);
    /* example: set the local solve to full LU solve */
    ierr = PCSetType(local_pc,PCLU);
  }
The possible choices for the second argument are now all of the non-parallel preconditioners available in the Petsc library; see below. The default is an identity preconditioner.

The local solve type could have been set by the following option:

    -sub_pc_type lu

The subdomain solvers may need additional parameters, eg the type of sweep in the case of a PCSOR solver. This can be done using the normal functions on the local_pc:

    PCSORSetSymmetric(local_pc,SOR_SYMMETRIC_SWEEP);
See the Petsc manual for the functions and values available.

This is the list of the local methods available:

PCNONE
Do a simple copy instead of a solve; equivalently, use the identity matrix as solver.
PCJACOBI
Use the diagonal of the matrix as solver.
PCSOR
Use a triangular part of the matrix; see the Petsc manual for further options.
PCILU
Use an incomplete factorisation as solver.
PCEISENSTAT
The Eisenstat variant of ILU(0).
PCICC
Use the Cholesky incomplete factorisation; this presupposes a symmetric matrix.
with corresponding option values none, jacobi, sor, bjacobi, eisenstat, ilu, icc.



Victor Eijkhout
7/27/1998