XDMF2: support for Matrix type
XDMF2 supports the Matrix type, which is of arbitrary length/shape, http://www.xdmf.org/index.php/Xdmf2_Model_and_Format_Archive.
In vtk this would translate into a flattened vector (Only 3x3 matrices are defined as far as I know). XDMF anyways requires/allows to flatten the dimension, i.e. a 3x3 matrix on a 2x2x2 grid has dimensions 2,2,2,9. This works even if the HDF5 dataset has dimensions of 2,2,2,3,3
Attaches is a set of example files to illustrates the situation.
In the current vtk version, the Matrix type is treated as a scalar, i.e. the first 2x2x2 elements are read (reading component 1,2,3,4 from point 1,1,1 etc...). Attached images illustrate the wrong and the correct behavior.