:orphan:
# SNESNGMRESSetRestartType
Sets the restart type for `SNESNGMRES`. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESNGMRESSetRestartType(SNES snes, SNESNGMRESRestartType rtype)
```
Logically Collective


## Input Parameters

- ***snes -*** the iterative context
- ***rtype -*** restart type



## Options Database Keys

- ***-snes_ngmres_restart_type<difference,periodic,none> -*** set the restart type
- ***-snes_ngmres_restart[30] -*** sets the number of iterations before restart for periodic



## `SNESNGMRESRestartType`s

- ***`SNES_NGMRES_RESTART_NONE` -*** never restart
- ***`SNES_NGMRES_RESTART_DIFFERENCE` -*** restart based upon difference criteria
- ***`SNES_NGMRES_RESTART_PERIODIC` -*** restart after a fixed number of iterations





## See Also
 `SNES_NGMRES_RESTART_DIFFERENCE`, `SNESNGMRES`, `SNESNGMRESRestartType`, `SNESNGMRESSetRestartFmRise()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/ngmres/snesngmres.c.html#SNESNGMRESSetRestartType">src/snes/impls/ngmres/snesngmres.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/ngmres/snesngmres.c.html#SNESNGMRESSetRestartType_NGMRES">SNESNGMRESSetRestartType_NGMRES in src/snes/impls/ngmres/snesngmres.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/impls/ngmres/snesngmres.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)  
