On Thu 2008-04-10 14:09, [EMAIL PROTECTED] wrote:
> Hi,
> How can I use a direct solver to solve a linear system of equations?
> Thanks in advance,
> Paulo

You can do this entirely with PETSc command line arguments.  For instance

-ksp_type preonly -pc_type lu

will solve the system using LU decomposition.  If your matrix is symmetric, you
can try -pc_type cholesky.  You can select different direct solvers by changing
the matrix type with -mat_type.  Run the program with -help and you will see the
supported types (such as umfpack, superlu, aijspooles, sbaijmumps).  Depending
on the problem, you may want to try preconditioning with algebraic multigrid.
You can build PETSc with libraries like Hypre, ML, and Prometheus, then use
-pc_type hypre.  For 3D problems, I find this starts beating a direct method
for quite small sizes.

Jed

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to