[petsc-dev] [petsc-users] Question about dm_view

Matthew Knepley knepley at gmail.com
Fri May 30 06:40:19 CDT 2014


On Thu, May 29, 2014 at 7:41 PM, Jed Brown <jed at jedbrown.org> wrote:

> Matthew Knepley <knepley at gmail.com> writes:
> > We could have a deprecation interface that checks each option on input
> > to the DB, compares to a list of deprecated options, and gives the
> > replacement in the error message. It would have to look for suffixes I
> > guess.
>
> That sounds like a centralized list of deprecated options.  I think I'd
> rather keep the deprecated statement located at the original site.
>

This has advantages. but I wanted early termination.

   Matt


>   ierr = PetscObjectOptionsBegin((PetscObject)dm);CHKERRQ(ierr);
>
>   // ... in DA implementation code
>   ierr = PetscOptionsDeprecatedAlias("-da_view","-dm_view");CHKERRQ(ierr);
>
> This would interpret the prefix correctly, so we would just get an
> unused warning for options that were previously unused, but deprecated
> error/warning for actually deprecated options.  In this case, we
> trivially know how to interpret -da_view, so could get away with just
> warning.  Perhaps also
>
>   PetscOptionsDeprecated("-old_option","Explain that objects changed so
> that -various -new_options are needed");
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140530/066ff82b/attachment.html>


More information about the petsc-dev mailing list