$Id: README.petsc,v 1.2 2005/07/20 08:16:49 nicolet Exp $

To compile PETSc >= 2.3 using complex arithmetic, on a single
processor machine:

1) Install blas and lapack if they are not already installed. On
Windows/Cygwin, just select lapack in the graphical installer. (Please
note that, as of July 20, 2005, the versions of blas and lapack
shipped with cygwin seem to be buggy and lead to various crashes. You
might want to recompile blas and lapack by yourself if you experience
any weird problems.) You will also need Python, as well as a C, C++
and a Fortran 77 compiler.

2) uncompress the PETSc distriution and, in the top directory, run

./config/configure.py --with-scalar-type=complex --with-mpi=0 --with-debugging=0

3) define PETSC_ARCH and PETSC_DIR in your shell environment

4) run "make"


To configure GetDP with PETSc support, run

./configure --enable-petsc

in the top level GetDP directory. Then run "make clean" and "make". If
you don't want to define PETSC_ARCH or PETSC_DIR "permanently", you
can also configure GetDP with

./configure --enable-petsc --with-petsc-arch=XXX --with-petsc-dir=/path/to/petsc


To pass options to PETSc, you can either put them in the ~/.petscrc
file, or specify them on the command line. By default, GetDP specifies
"reasonable" options to PETSc (GMRES iterative solver with ILU(k)
preconditoner and RCMK renumbering ). 

To print the residual and choose a level of 10 for the fill-in of
ILU(k), use:

getdp -ksp_monitor -pc_ilu_levels 40

To use a direct sparse LU solver instead of the iterative solver, use:

getdp -ksp_type preonly -pc_type lu

Check DofData/LinAlg_PETSC.c and the PETSc reference manual for a list
of other available options.
