[petsc-users] Fwd: nonzero prescribed boundary condition
Satish Balay
balay at mcs.anl.gov
Fri Sep 9 22:31:57 CDT 2011
On Fri, 9 Sep 2011, Hong Zhang wrote:
> amrit :
> >
> > If I run a program with the following runtime option (notice that I have not
> > included -pc_type lu ), will the program use mumps to solve the linear
> > system of equations directly, or does it run with default gmres iterative
> > solver? Why do we have to specify a preconditioner for a direct solver ?
> >
> > -pc_factor_mat_solver_package mumps
>
> You must include '-pc_type lu' to use mumps.
> There are many preconditioners for solving linear system, lu is one of pcs,
> and mumps is one of packages implement lu.
PETSc solver is organized as 2 parts: KSP, PC
With this organization - direct solvers are categorized under PC.
Sure - you don't need gmres with a direct solver - so you would use:
--ksp_type preonly -pc_type lu
The reason this organization makes sense for us is - we easily support
stuff like:
-ksp_type gmres -pc_type bjacobi -sub_pc lu [-sub_ksp preonly]
And as Hong mentioned - mumps is one of the direct solvers we provide
interface to - other prominant one is superlu_dist. Both are
accessiable with
'-pc_type lu -pc_factor_mat_solver_package [mumps or superlu_dist]' etc...
Satish
More information about the petsc-users
mailing list