Hello,
I am trying to use vtkGradientFilter to calculate the gradient at each point. However I didn’t find an example that fits my need.
What I have is a .vtu file. It is an unstructured grid with 5 triangle cells. What I’d like to do is to get the gradient of each triangle vertex as something like vtkDataSet that I can access the gradient vector value.
testInput.vtu (1.0 KB)
I followed the example here: (https://kitware.github.io/vtk-examples/site/Cxx/PolyData/GradientFilter/) but cannot find a way to print or read the gradient.
Any help would be appreciated! Thank you!