[petsc-users] How to use PETSc preconditioners in SLEPc?

Matthew Knepley knepley at gmail.com
Tue May 21 12:32:14 CDT 2013


On Tue, May 21, 2013 at 12:18 PM, Heikki Virtanen <
heikki.a.virtanen at hotmail.com> wrote:

> Thanks! If there is a way to avoid command line options,
> it would be excellent. Sorry, that I didn't remember to
>

Why?


> mention this one. Your example has command line options
> "st_ksp_type","st_pc_type","st_pc_hypre_type"
> Do they have an equivalent function calls?
>

Yes, all of them do (see online manual). However, we discourage you from
doing
this because then you hardcode a single solver. The aim should be to try a
range
of solvers and find the right one for your problem.

   Matt


>
> -Heikki
>
>
> > > Hi, I try to solve eigenvalue problem using EPS object
> > > and Krylov-Schur solver. Everything goes well and I
> > > can solve the problems that I want.
> > >
> > > Anyway, I want to use other preconditioners than the
> > > default preconditioner. It is a little bit unclear for
> > > me how to do this. For example, I have installed
> > > PETSc with Hypre. How can use BoomerAMG preconditioner
> > > instead of ILU? ( SLEPc chooses this by default )
> > >
> > > -Heikki
> >
> > Have a look at section 3.4.1 of SLEPc's users guide. For instance, you
> can try something like this:
> >
> > $ ./program -st_ksp_type bcgs -st_pc_type hypre -st_pc_hypre_type
> boomeramg
> >
> > Jose
> >
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130521/8a51ecaf/attachment.html>


More information about the petsc-users mailing list