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


## Input Parameters

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



## Options Database Keys

- ***-snes_qn_restart_type <powell,periodic,none> -*** set the restart type
- ***-snes_qn_m <m> -*** sets the number of stored updates and the restart period for periodic





## `SNESQNRestartType`s

- ***`SNES_QN_RESTART_NONE` -*** never restart
- ***`SNES_QN_RESTART_POWELL` -*** restart based upon descent criteria
- ***`SNES_QN_RESTART_PERIODIC` -*** restart after a fixed number of iterations



## See Also
 `SNESQN`, `SNESQNRestartType`, `SNES_QN_RESTART_NONE`, `SNES_QN_RESTART_POWELL`, `SNES_QN_RESTART_PERIODIC`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/qn/qn.c.html#SNESQNSetRestartType">src/snes/impls/qn/qn.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/qn/qn.c.html#SNESQNSetRestartType_QN">SNESQNSetRestartType_QN in src/snes/impls/qn/qn.c</A><BR>


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