PetscOptionsDeprecatedNoObject#
mark an option as deprecated in the global PetscOptionsObject, optionally replacing it with newname. By default this will trigger a deprecation warning at runtime if oldname is in the options database.
Synopsis#
#include <petscoptions.h>
PetscErrorCode PetscOptionsDeprecatedNoObject(const char oldname[], const char newname[], const char version[], const char info[])
Logically Collective
Input Parameters#
oldname - the old, deprecated option
newname - the new option, or
NULLif the option is removed and not simply renamedversion - a string describing the version of first deprecation, e.g.
"3.9"info - additional information string, or
NULL. Must be provided ifnewnameisNULL
Options Database Key#
-options_suppress_deprecated_warnings - do not print deprecation warnings
Notes#
The old call PetscOptionsXXX(oldname) should be removed from the source code when both (1) the call to PetscOptionsDeprecatedNoObject() occurs before the
new call to PetscOptionsXXX(newname) and (2) the argument handling of the new call to PetscOptionsXXX(newname) is identical to the previous call.
See PTScotch_PartGraph_Seq() for an example of when (1) fails and SNESTestJacobian() where an example of (2) fails.
Not to be called between PetscOptionsBegin() (or PetscObjectOptionsBegin()) and PetscOptionsEnd(). Use PetscOptionsDeprecated() in that case.
Only the process of MPI rank zero prints the deprecation warning.
If newname is provided, any use of oldname in the options database is replaced with newname. Otherwise, oldname remains in the options database.
There is a limit on the length of the warning printed, so long strings provided as info may be truncated.
See Also#
PetscOptionsDeprecated(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsScalar(), PetscOptionsBool(), PetscOptionsString(), PetscOptionsSetValue()
Level#
developer
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages