PetscOptionsHeadEnd — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscOptionsHeadEnd

Ends a section of options begun with `PetscOptionsHeadBegin()` See, for example, `KSPSetFromOptions_GMRES()`.

## Synopsis

    #include <petscoptions.h>
    PetscErrorCode PetscOptionsHeadEnd(void)

Collective on the comm used in `PetscOptionsBegin()` or obj used in `PetscObjectOptionsBegin()`

## Notes

Must be between a `PetscOptionsBegin()` or `PetscObjectOptionsBegin()` and a `PetscOptionsEnd()`

Must be preceded by a call to `PetscOptionsHeadBegin()` in the same function.

This needs to be used only if the code below `PetscOptionsHeadEnd()` can be run ONLY once. See, for example, `PCSetFromOptions_Composite()`. This is a `return(0)` in it for early exit from the function.

This is only for use with the PETSc options GUI

## See Also

`PetscOptionsGetInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`, `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, `PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsEnum()`

## Level

intermediate

## Location

include/petscoptions.h

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