# SNESLineSearchReason
if line search has succeeded or failed and why 
## Synopsis
```
typedef enum {
  SNES_LINESEARCH_SUCCEEDED,
  SNES_LINESEARCH_FAILED_NANORINF,
  SNES_LINESEARCH_FAILED_DOMAIN,
  SNES_LINESEARCH_FAILED_REDUCT, /* INSUFFICIENT REDUCTION */
  SNES_LINESEARCH_FAILED_USER,
  SNES_LINESEARCH_FAILED_FUNCTION
} SNESLineSearchReason;
```



## Developer Notes
This must match petsc/finclude/petscsnes.h

The string versions of these are in `SNESLineSearchReasons`, if you change any value here you must
also adjust that array.


## See Also
 `SNESSolve()`, `SNESGetConvergedReason()`, `KSPConvergedReason`, `SNESSetConvergenceTest()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsnes.h.html#SNESLineSearchReason">include/petscsnes.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsnes.h)


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