# How does Paraview compute spatial derivatives at boundaries

**URL:** https://discourse.paraview.org/t/how-does-paraview-compute-spatial-derivatives-at-boundaries/2986
**Category:** Development
**Created:** [November 15, 2019, 3:10pm UTC](https://discourse.paraview.org/t/how-does-paraview-compute-spatial-derivatives-at-boundaries/2986 "2019-11-15T15:10:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kevinw](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@kevinw](https://discourse.paraview.org/u/kevinw)
#### Post date: [November 15, 2019, 3:10pm UTC](https://discourse.paraview.org/t/how-does-paraview-compute-spatial-derivatives-at-boundaries/2986/1 "2019-11-15T15:10:26Z")

</div>

Hi,

I am using the “Gradient of Unstructured Data Set” filter to calculate the curl and divergence of a 3D field. How does Paraview compute the derivatives on domain boundaries?

In my case, one boundary of the domain (say, x = 0) is a symmetry boundary. But I don’t think Paraview knows this since it is not specified in the solution file (in exo format).

After running “Gradient of Unstructured Data Set”, I observe a significant difference in divergence between the x = 0 plane and any other plane that is slightly into the domain (say, x = 0.0001). I am not sure how to interpret this…

Any help is highly appreciated!

Thanks,  
Kevin

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 18, 2019, 10:28am UTC](https://discourse.paraview.org/t/how-does-paraview-compute-spatial-derivatives-at-boundaries/2986/2 "2019-11-18T10:28:40Z")

</div>

> [@kevinw](#):
>
> In my case, one boundary of the domain (say, x = 0) is a symmetry boundary. But I don’t think Paraview knows this since it is not specified in the solution file (in exo format).

It doesn’t.

Here the documentation of the underlying Graddient filter:  
[https://vtk.org/doc/nightly/html/classvtkGradientFilter.html](https://vtk.org/doc/nightly/html/classvtkGradientFilter.html)

And the source code :  
[https://gitlab.kitware.com/vtk/vtk/blob/master/Filters/General/vtkGradientFilter.cxx](https://gitlab.kitware.com/vtk/vtk/blob/master/Filters/General/vtkGradientFilter.cxx)

---

<div class="post-metadata">

### Author: ![kevinw](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/94ad74/32.png) [@kevinw](https://discourse.paraview.org/u/kevinw)
#### Post date: [November 18, 2019, 1:04pm UTC](https://discourse.paraview.org/t/how-does-paraview-compute-spatial-derivatives-at-boundaries/2986/3 "2019-11-18T13:04:00Z")

</div>

Thanks, Matt!
