# Definition of Gradients

**URL:** https://discourse.paraview.org/t/definition-of-gradients/4767
**Category:** ParaView Support
**Created:** [July 7, 2020, 4:37am UTC](https://discourse.paraview.org/t/definition-of-gradients/4767 "2020-07-07T04:37:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ashish](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@ashish](https://discourse.paraview.org/u/ashish)
#### Post date: [July 7, 2020, 4:37am UTC](https://discourse.paraview.org/t/definition-of-gradients/4767/1 "2020-07-07T04:37:22Z")

</div>

Hello,

I have computed a velocity vector and the same is given as an input for _GradientofUNstructuredDataSets_. Here I have used Compute Gradient option which gives me Gradient 0 to Gradient 8. What is the definition of Gradient 0 to Gradient 8.  
If I have u, v, w as velocity components and need to compute du/dx, du/dy, du/dz etc.

Regards,

---

<div class="post-metadata">

### Author: ![Rob777](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rob777/32/3776_2.png) [@Rob777](https://discourse.paraview.org/u/Rob777)
#### Post date: [July 7, 2020, 8:26am UTC](https://discourse.paraview.org/t/definition-of-gradients/4767/2 "2020-07-07T08:26:45Z")

</div>

Gradient 0 to 8 are the 9 components of the gradient of a vector field.  
[https://math.stackexchange.com/questions/156880/what-does-it-mean-to-take-the-gradient-of-a-vector-field](https://math.stackexchange.com/questions/156880/what-does-it-mean-to-take-the-gradient-of-a-vector-field)

---

<div class="post-metadata">

### Author: ![ashish](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@ashish](https://discourse.paraview.org/u/ashish)
#### Post date: [July 7, 2020, 12:37pm UTC](https://discourse.paraview.org/t/definition-of-gradients/4767/3 "2020-07-07T12:37:49Z")

</div>

Thank you for your reply.  
I understand that Gradient 0 to 8 are the components of the gradient of vector field, but i wanted to know that how is Gradient 0, 1, … defined? is it dU/dx, dU/dy,… or something else.

---

<div class="post-metadata">

### Author: ![Rob777](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rob777/32/3776_2.png) [@Rob777](https://discourse.paraview.org/u/Rob777)
#### Post date: [July 7, 2020, 12:46pm UTC](https://discourse.paraview.org/t/definition-of-gradients/4767/4 "2020-07-07T12:46:46Z")

</div>

0 to 2 are du/dx , du/dy , du/dz .  
3 to 5 are dv/dx , dv/dy , dv/dz .  
6 to 8 are dw/dx , dw/dy , dw/dz .  
This is the best source I found :  
[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: ![ashish](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@ashish](https://discourse.paraview.org/u/ashish)
#### Post date: [July 7, 2020, 2:30pm UTC](https://discourse.paraview.org/t/definition-of-gradients/4767/5 "2020-07-07T14:30:11Z")

</div>

Thank you so much Roberto Putzu, this is what I needed.
