[petsc-dev] consequences of setting KSP_NORM_TYPE to NONE

Barry Smith bsmith at mcs.anl.gov
Sun Jun 12 23:03:49 CDT 2016


> On Jun 12, 2016, at 10:53 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>>   This looks like a reasonable fix for me. The manual page should indicate that it changes the convergence test if you change from no norm.
> 
> Alternatively, KSPConvergedDefault could just exit immediately instead
> of erroring with KSP_NORM_NONE?  Why do these options need to be
> non-orthogonal such that they need this kind of manipulation?

  Less code is, of course, always most appealing. Currently KSPConvergedDefault() has

 if (normtype == KSP_NORM_NONE) SETERRQ(PetscObjectComm((PetscObject)ksp),PETSC_ERR_ARG_WRONGSTATE,"Use KSPConvergedSkip() with KSPNormType of KSP_NORM_NONE");

presumably this is so that a user won't mistakenly set the convergence test after setting the norm to none and assume that the test will work? But does this really provide anything of value?






More information about the petsc-dev mailing list