petsc-3.10.5 2019-03-28
Report Typos and Errors

PetscOptionsDeprecated

mark an option as deprecated, optionally replacing it with a new one

Synopsis

#include "petscsys.h"   
PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems *PetscOptionsObject,const char oldname[],const char newname[],const char version[],const char info[])
Prints a deprecation warning, unless an option is supplied to suppress.

Not Collective

Input Parameters

pre - string to prepend to name or NULL
oldname - the old, deprecated option
newname - the new option, or NULL if option is purely removed
version - a string describing the version of first deprecation, e.g. "3.9"
info - additional information string, or NULL.

Options Database Keys

-options_suppress_deprecated_warnings -do not print deprecation warnings

Notes

Must be called between PetscOptionsBegin() and PetscOptionsEnd(). If newname is provided, the old option is replaced. Otherwise, it remains in the options database. If an option is not replaced, the info argument should be used to advise the user on how to proceed. There is a limit on the length of the warning printed, so very long strings provided as info may be truncated.

See Also

PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsScalar(), PetscOptionsBool(), PetscOptionsString(), PetscOptionsSetValue()

Level

developer

Location

src/sys/objects/options.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages