SNESNGMRESSetSelectType — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# SNESNGMRESSetSelectType

Sets the selection type for `SNESNGMRES`. This determines how the candidate solution and combined solution are used to create the next iterate.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESNGMRESSetSelectType(SNES snes, SNESNGMRESSelectType stype)

Logically Collective

## Input Parameters

- snes - the iterative context

- stype - selection type, see `SNESNGMRESSelectType`

## Options Database Key

- -snes_ngmres_select_type<difference,none,linesearch> - select type

## Note

The default line search used is the `SNESLINESEARCHL2` line search and it requires two additional function evaluations.

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESNGMRES`, `SNESNGMRESSelectType`, `SNES_NGMRES_SELECT_NONE`, `SNES_NGMRES_SELECT_DIFFERENCE`, `SNES_NGMRES_SELECT_LINESEARCH`, `SNESNGMRESSetRestartType()`

## Level

intermediate

## Location

src/snes/impls/ngmres/snesngmres.c

## Implementations

SNESNGMRESSetSelectType_NGMRES() in src/snes/impls/ngmres/snesngmres.c

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