[petsc-dev] How to respond to incompatible right/left preconditioned/unpreconditioned?

Barry Smith bsmith at mcs.anl.gov
Wed Mar 16 16:53:11 CDT 2011


On Mar 16, 2011, at 4:40 PM, Jed Brown wrote:

> So currently, I can do
> 
> $ ./ex2 -ksp_pc_side right -ksp_norm_type preconditioned
> 
> which is nonsense (it actually uses the unpreconditioned norm). We could just add a guard in KSPSolve_GMRES to handle this case, but then

   This is an oversight, it should generate an error.

> 
> ./ex2 -ksp_pc_side right
> 
> fails. It would be a pain to have two options that always need to be changed together so maybe calling KSPSetPCSide() should automatically choose which side to use. But that isn't consistent across methods and it's really bad to ignore explicit user input. Also, what if you just want to think about what norm the residuals are calculated in instead of thinking of which "side" the preconditioner is working with.
> 
> So what if instead we had KSP_NORM_DEFAULT and PC_SIDE_DEFAULT, then KSPSetUp_XXX() would turn the default value into whatever actually works and error if the user has set an incompatible combination?

  Sounds reasonable.

  Barry





More information about the petsc-dev mailing list