Hi,
I created several KSP objects, each solves different problem.
Some problems are well conditioned, thus GMRES+ASM(ilu) works well.
However, there's a bad conditioned problem. I have to use GMRES + ASM(lu).
The problem is I set the KSP and PC BEFORE matrix assembled.
For this situation, I can not call KSPSetUp then PCASMGetSubKSP to set each
KSP/PC for local block.
At the same time, set sub pc by petsc options i.e
PetscOptionsSetValue("-sub_pc_type","lu")
will cause conflict since options are global.
The solver use GMRES + ASM(ILU) will use
PetscOptionsSetValue("-sub_pc_type","ilu")
But solver use GMRES + ASM(LU) will set
PetscOptionsSetValue("-sub_pc_type","lu") and
PetscOptionsSetValue("-sub_pc_factor_mat_solver_package","mumps")
Any comment to solve this problem?
I wonder if petsc options can be attached to a specified petsc object?
Gong Ding