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

Jed Brown jedbrown at mcs.anl.gov
Tue May 21 13:29:48 CDT 2013


Heikki Virtanen <heikki.a.virtanen at hotmail.com> writes:

> Thanks! If there is a way to avoid command line options,
> it would be excellent. Sorry, that I didn't remember to 
> mention this one. Your example has command line options
> "st_ksp_type","st_pc_type","st_pc_hypre_type"

Note that you can use the PETSC_OPTIONS environment variable, a petscrc
file, or any other file.  See the user's manual and this page for
details.

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsInsertFile.html

> Do they have an equivalent function calls?
>
> -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
>> 
>  		 	   		  


More information about the petsc-users mailing list