[petsc-users] How to use command line option for separate matrix

TAY wee-beng zonexo at gmail.com
Mon Mar 17 09:39:30 CDT 2014


Hi,

I use

call KSPSetOptionsPrefix(ksp_semi_xyz,"momentum_",ierr)

and

call KSPSetOptionsPrefix(ksp,"poisson_",ierr)

so that I can choose separate ksp/pc options for my momentum and poisson 
equations through command line e.g.

-poisson_ksp_type gmres -poisson_pc_type hypre -poisson_pc_type_hypre 
boomeramg

In general, I need to use boomeramg as the preconditioner and gmres as 
the solver for my poisson eqn, separate from my momentum eqn, which has 
its own default pc and ksp. Is the above the correct way?

Thanks!

-- 
Yours sincerely,

TAY wee-beng



More information about the petsc-users mailing list