Re: [petsc-users] PCFactorSetShiftType does not work in code but -pc_factor_set_shift_type works

2017-05-25 Thread Danyang Su
Hi Hong, It works like a charm. I really appreciate your help. Regards, Danyang On 17-05-25 07:49 AM, Hong wrote: Danyang: You must access inner pc, then set shift. See petsc/src/ksp/ksp/examples/tutorials/ex7.c For example, I add following to petsc/src/ksp/ksp/examples/tutorials/ex2.c,

Re: [petsc-users] PCFactorSetShiftType does not work in code but -pc_factor_set_shift_type works

2017-05-25 Thread Hong
Danyang: You must access inner pc, then set shift. See petsc/src/ksp/ksp/examples/tutorials/ex7.c For example, I add following to petsc/src/ksp/ksp/examples/tutorials/ex2.c, line 191: PetscBool isbjacobi; PCpc; ierr = KSPGetPC(ksp,);CHKERRQ(ierr); ierr =

[petsc-users] PCFactorSetShiftType does not work in code but -pc_factor_set_shift_type works

2017-05-25 Thread Danyang Su
Dear Hong and Barry, I have implemented this option in the code, as we also need to use configuration from file for convenience. When I run the code using options, it works fine, however, when I run the code using configuration file, it does not work. The code has two set of equations, flow