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.

Logically 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 Key#

  • -options_suppress_deprecated_warnings - do not print deprecation warnings

Notes#

Must be called between PetscOptionsBegin() (or PetscObjectOptionsBegin()) and PetscOptionsEnd(). Only the process of rank zero that owns the PetscOptionsItems are argument (managed by PetscOptionsBegin() or PetscObjectOptionsBegin() prints the information 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


Edit on GitLab

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages