# SNESSetCheckJacobianDomainError
tells `SNESSolve()` whether to check if the user called `SNESSetJacobianDomainError()` Jacobian domain error after each Jacobian evaluation. By default, we check Jacobian domain error in the debug mode, and do not check it in the optimized mode. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESSetCheckJacobianDomainError(SNES snes, PetscBool flg)
```
Logically Collective on snes


## Input Parameters

- ***snes -*** the SNES context
- ***flg  -*** indicates if or not to check Jacobian domain error after each Jacobian evaluation





## Note
Checks require one extra parallel synchronization for each Jacobian evaluation


## See Also
 `SNESCreate()`, `SNESSetFunction()`, `SNESFunction()`, `SNESSetFunctionDomainError()`, `SNESGetCheckJacobianDomainError()`

## Level
advanced

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


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
