<div dir="ltr"><div><div><div><div>Hi,<br><br></div><div>I wanted to inform everyone that there is some inconsistencies in the way 2nd order tensors are represented in VTK data arrays. The vtkGradientFilter outputs in C/row-major ordering while the vtkCellDerivatives filter outputs in Fortran/column-major ordering. There are other inconsistencies to this as well. Officially, VTK uses C/row-major ordering for tuples. An example of this is the vtkCell::Derivatives() method (<a href="http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068">http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068</a>). <br><br></div><div>Martin Genet has brought this inconsistency to light with his work on vtkCellDerivatives in changing this to row-major ordering output. 40e05b6a is his commit that fixed this issue for the filter, its documentation and how vector_gradient and strain are computed in the VTK numpy interface. He additionally removed the vtkTensor which was only used by vtkCellDerivatives to transpose the 2nd order tensor's output. <br><br></div><div>There may be other 2nd order tensor ordering inconsistencies in VTK that should be cleaned up as well and we hope to address those ASAP. The most difficult of these will likely be in the readers that bring in 2nd order tensors. I would encourage those that are familiar with specific readers to spend a couple of minutes verifying the correct ordering from them.<br></div><div><br></div>I'll be adding in notes about this fix to Documentation/Doxygen/ChangesVTK-7-1.md shortly.<br><br></div>Best regards,<br></div>Andy<br><br></div>ps. A big thanks to Martin for his fixes and his patience on getting this through! This is his second and third commit to VTK.<br></div>