Direct Linear Solvers

Hong Zhang hzhang at mcs.anl.gov
Sun Aug 27 22:18:34 CDT 2006


Julian,

> I looked at the linear solvers summary page and I could find three direct
> solvers that do not use any external packages. But I could find an example
> for only one of them (LU). The link to the cholesky solver does not have any
> example file. I am new to PETSc and I don't fully understand how the
> different solvers are invoked. Do I just change  PCSetType(pc,PCLU); to
> PCSetType(pc,PCCHOLESKY); ?
Yes.

You can run petsc KSP example with runtime option, e.g.
~petsc//src/ksp/ksp/examples/tutorials/ex5.c:

./ex5 -ksp_type preonly -pc_type cholesky

or examples on low level call of MatCholeskyFactor()
/src/mat/examples/tests/ex74.c (not recommended for user)

>
> And the "XXt and Xyt" solver does not have any link. How do I use that
> solver?

These are the interface to the Tufo-Fischer parallel direct solver.
I don't knwo much about them. Someone from petsc team may tell
you more about "XXt and Xyt".
>
> Also, do the direct solvers do its own internal renumbering to reduce the
> matrix bandwidth? Or do we have to take care of that outside of PETSc?
>
Do you mean matrix reordering? We do support a set of orderings.
Run a petsc mat or ksp example with the opiton
-help |grep -i ordering,
then you'll see the orderings provided.

Hong




More information about the petsc-users mailing list