[petsc-dev] rename SNES methods ls, tr etc

Barry Smith bsmith at mcs.anl.gov
Mon Dec 3 07:35:51 CST 2012


On Dec 3, 2012, at 12:40 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Fine with me, but it might be nice if the name could somehow convey that this is just a defect-correction iteration and need not be Newton (e.g., it's Picard if a Picard linearization is used).

    Picard is a weird beasty the way I implemented it.   Instead of having a "SNESType picard" one uses SNESType ls and then provides SNESSetPicard() (or local version of snessetpicard) instead of SNESSetFunction/Jacobian. 

     We could change things to have a SNESType Picard and then have the user call SNESSetFunction() and SNESSet"Jacobian"() but the meaning of function and Jacobian are not the same as for Newton so that is not great. 

      We could add a SNESType Picard and then require the user to also call SNESSetPicard() to provide the Picard function and matrix. Then there is no confusing of setting a type of Newton but actually doing Picard. Internally the Picard snes type would behave just as the ls one does now handling Picard as a special case; in other words SNESType Picard is just an alias for Newton internally. But user is clearly using picard type. What do you think?

   Barry



> OTOH, the name "Newton" is much more recognizable...
> 
> 
> On Sun, Dec 2, 2012 at 5:51 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Sun, Dec 2, 2012 at 6:27 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> >    Can we rename
> >
> > #define SNESLS           "ls"
> > #define SNESTR           "tr"
> > #define SNESVIRS         "virs"
> > #define SNESVISS         "viss"
> >
> > to something like   newtonls newtontr vinewtonrs vinewtonss?  Suggestions for names?
> 
> +1
> 
>   Matt
> 
> >    Now that we have many other methods than Newton these names are terrible and confusing.
> >
> >    Thanks
> >
> >     Barry
> >
> 
> 
> 
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which
> their experiments lead.
> -- Norbert Wiener
> 




More information about the petsc-dev mailing list