# SNESQNSetScaleType
Sets the scaling type for the inner inverse Jacobian in `SNESQN`. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESQNSetScaleType(SNES snes, SNESQNScaleType stype)
```
Logically Collective


## Input Parameters

- ***snes -*** the nonlinear solver context
- ***stype -*** scale type



## Options Database Key

- ***-snes_qn_scale_type <diagonal,none,scalar,jacobian> -*** Scaling type





## `SNESQNScaleType`s

- ***`SNES_QN_SCALE_NONE` -*** don't scale the problem
- ***`SNES_QN_SCALE_SCALAR` -*** use Shanno scaling
- ***`SNES_QN_SCALE_DIAGONAL` -*** scale with a diagonalized BFGS formula (see Gilbert and Lemarechal 1989), available
- ***`SNES_QN_SCALE_JACOBIAN` -*** scale by solving a linear system coming from the Jacobian you provided with SNESSetJacobian() computed at the first iteration
of QN and at ever restart.



## See Also
 `SNES`, `SNESQN`, `SNESLineSearch`, `SNESQNScaleType`, `SNESSetJacobian()`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/qn/qn.c.html#SNESQNSetScaleType_QN">SNESQNSetScaleType_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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
