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

Jed Brown jed at jedbrown.org
Thu May 29 19:41:31 CDT 2014


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.

  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");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140530/07d0d856/attachment.sig>


More information about the petsc-dev mailing list