PetscOptionType — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscOptionType

Identifies the kind of value held by a `PetscOptionItem` inside a `PetscOptionsBegin()`/`PetscOptionsEnd()` block

## Synopsis

    typedef enum {
      OPTION_INT,
      OPTION_BOOL,
      OPTION_REAL,
      OPTION_FLIST,
      OPTION_STRING,
      OPTION_REAL_ARRAY,
      OPTION_SCALAR_ARRAY,
      OPTION_HEAD,
      OPTION_INT_ARRAY,
      OPTION_ELIST,
      OPTION_BOOL_ARRAY,
      OPTION_STRING_ARRAY
    } PetscOptionType;

## Values

- `OPTION_INT` - a single `PetscInt`

- `OPTION_BOOL` - a single `PetscBool`

- `OPTION_REAL` - a single `PetscReal`

- `OPTION_FLIST` - a selection from a registered `PetscFunctionList`

- `OPTION_STRING` - a single string

- `OPTION_REAL_ARRAY` - an array of `PetscReal`

- `OPTION_SCALAR_ARRAY` - an array of `PetscScalar`

- `OPTION_HEAD` - a section heading inserted with `PetscOptionsHead()`

- `OPTION_INT_ARRAY` - an array of `PetscInt`

- `OPTION_ELIST` - a selection from an enumerated list of strings

- `OPTION_BOOL_ARRAY` - an array of `PetscBool`

- `OPTION_STRING_ARRAY` - an array of strings

## See Also

`PetscOptions`, `PetscOptionItem`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsInt()`, `PetscOptionsReal()`

## Level

developer

## Location

include/petscoptions.h

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