[petsc-users] KSPSetOptionsPrefix usage

Gong Ding gdiso at ustc.edu
Tue Mar 27 03:23:08 CDT 2012


Hi
I now use KSPSetOptionsPrefix to avoid option conflict to several KSP objects.
I know KSPSetOptionsPrefix will call PCSetOptionsPrefix, PC options can be safely added the same prefix.
However, what about the matrix prefix? i.e. I would like to use following code  

ierr = PCSetType (pc, (char*) PCILU);
ierr = PCFactorSetMatSolverPackage (pc, "superlu");
ierr = PetscOptionsSetValue("-mat_superlu_rowperm","LargeDiag");
ierr = PetscOptionsSetValue("-mat_superlu_ilu_droptol","1e-4");
ierr = PetscOptionsSetValue("-mat_superlu_ilu_filltol","1e-2");
ierr = PetscOptionsSetValue("-mat_superlu_ilu_fillfactor","20");

Suppose I use prefix as "KSP1_", should I change mat option name to, i.e.
-KSP1_mat_superlu_rowperm?

Gong Ding



More information about the petsc-users mailing list