Hello petsc-users, I've been running some CFD simulations, and I ran into one case where the system (which is a coupled system for pressure and body forces) did not converge and the reason was KSP_DIVERGED_INDEFINITE_PC. The options I'm using are -pc_gamg_agg_nsmooths 1 -pc_type gamg -pc_gamg_type agg with a conjugate gradient solver.
I saw in example ksp/pc/examples/tutorials/ex2.c that I should use the flag -pc_factor_shift_positive_definite to avoid this. I have a few questions regarding this: 1. What does it mean that the preconditioner is indefinite? What can cause this to happen? And what does the above flag do? 2. The error occurs midway through the simulation. Is there any reason why this might be the case? The left-hand side matrix does not change during the simulation. 3. Do both -pc_factor_shift_positive_definite and -pc_factor_shift_type POSITIVE_DEFINITE do the same thing? Thank you, Anush
