# PetscFVComputeGradient
Compute the gradient reconstruction matrix for a given cell 
## Synopsis
```
#include "petscfv.h" 
PetscErrorCode PetscFVComputeGradient(PetscFV fvm, PetscInt numFaces, PetscScalar dx[], PetscScalar grad[])
```

## Input Parameters

- ***fvm      -*** The `PetscFV` object
- ***numFaces -*** The number of cell faces which are not constrained
- ***dx       -*** The vector from the cell centroid to the neighboring cell centroid for each face





## See Also
 `PetscFV`, `PetscFVCreate()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/fv/interface/fv.c.html#PetscFVComputeGradient">src/dm/dt/fv/interface/fv.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/fv/interface/fv.c)


[Index of all FV routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
