GradientOfUnstructuredDataSet VS PythonCalculator's gradient

I try to get gradient of a vector field in Paraview. However using GradientOfUnstructuredDataSet will generate different results than PythonCalculator’s gradient.

Here is my expression input for python calculator: gradient(inputs[0].PointData[‘Txj’])

Try turning on the Faster Approximation option for the Gradient Of Unstructured Data Set filter. When I tried this and I turned that on, the results seemed to match more closely.

When computing gradients on a finite mesh, you are only able to estimate them using finite differences. And depending on how define the finite differences are defined, you can get different answers. By default, the Gradient Of Unstructured Data Set is doing some extra work to make a more accurate gradient.

1 Like

Thanks for your answer,