PetscOptionSource — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscOptionSource

Records where a value in the PETSc options database came from, passed to options-database monitors

## Synopsis

    typedef enum {
      PETSC_OPT_CODE,
      PETSC_OPT_COMMAND_LINE,
      PETSC_OPT_FILE,
      PETSC_OPT_ENVIRONMENT,
      NUM_PETSC_OPT_SOURCE
    } PetscOptionSource;

## Values

- `PETSC_OPT_CODE` - the option was set by a call from inside source code, for example `PetscOptionsSetValue()`

- `PETSC_OPT_COMMAND_LINE` - the option came from the command-line arguments of the program

- `PETSC_OPT_FILE` - the option came from an options file processed by `PetscOptionsInsertFile()` (or its YAML counterpart)

- `PETSC_OPT_ENVIRONMENT` - the option came from the `PETSC_OPTIONS` (or related) environment variable

- `NUM_PETSC_OPT_SOURCE` - sentinel; equals the number of valid option sources

## See Also

`PetscOptions`, `PetscOptionsMonitorSet()`, `PetscOptionsMonitorDefault()`

## Level

developer

## Location

include/petscoptions.h

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