# DMPlexSNESComputeResidualFEM
Sums the local residual into vector F from the local input X using pointwise functions specified by the user 
## Synopsis
```
#include "petscdmplex.h" 
#include "petscsnes.h"   
PetscErrorCode DMPlexSNESComputeResidualFEM(DM dm, Vec X, Vec F, void *user)
```

## Input Parameters

- ***dm -*** The mesh
- ***X  -*** Local solution
- ***user -*** The user context



## Output Parameter

- ***F  -*** Local output vector



## Note
The residual is summed into F; the caller is responsible for using `VecZeroEntries()` or otherwise ensuring that any data in F is intentional.




## See Also
 `DM`, `DMPlexComputeJacobianAction()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/utils/dmplexsnes.c.html#DMPlexSNESComputeResidualFEM">src/snes/utils/dmplexsnes.c</A>


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