:orphan:
# SNESGetType
Gets the `SNES` method type and name (as a string). 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetType(SNES snes, SNESType *type)
```
Not Collective


## Input Parameter

- ***snes -*** nonlinear solver context



## Output Parameter

- ***type -*** `SNES` method (a character string)





## See Also
 [](ch_snes), `SNESSetType()`, `SNESType`, `SNESSetFromOptions()`, `SNES`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/snes.c.html#SNESGetType">src/snes/interface/snes.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex3.c.html">src/snes/tutorials/ex3.c</A><BR>


---
[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)  
