:orphan: # SNESMonitorSetFromOptions Sets a monitor function and viewer appropriate for the type indicated by the user ## Synopsis ``` #include "petscsnes.h" PetscErrorCode SNESMonitorSetFromOptions(SNES snes, const char name[], const char help[], const char manual[], PetscErrorCode (*monitor)(SNES, PetscInt, PetscReal, PetscViewerAndFormat *), PetscErrorCode (*monitorsetup)(SNES, PetscViewerAndFormat *)) ``` Collective ## Input Parameters - ***snes -*** `SNES` object you wish to monitor - ***name -*** the monitor type one is seeking - ***help -*** message indicating what monitoring is done - ***manual -*** manual page for the monitor - ***monitor -*** the monitor function - ***monitorsetup -*** a function that is called once ONLY if the user selected this monitor that may set additional features of the `SNES` or `PetscViewer` objects ## Options Database Key - ***-name -*** trigger the use of this monitor in `SNESSetFromOptions()` ## See Also [](ch_snes), `PetscOptionsGetViewer()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()` `PetscOptionsInt()`, `PetscOptionsString()`, `PetscOptionsReal()`, `PetscOptionsBool()`, `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, `PetscOptionsFList()`, `PetscOptionsEList()` ## Level advanced ## Location src/snes/interface/snes.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.c) [Index of all SNES routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)