I have managed to write an export function in another software to export the geometry of this mesh.
The fact is that I had properties which are ONLY on the volumetric elements (Hex, tetra, prisms, pyramids). Let’s say for example a Young modulus.
I would like to know if it is possible, in my .vtu file, to specify that ? In other words, I do not want to have to write some useless values for these properties on the segments, quad and triangles.
I would like to know if it is possible, in my .vtu file, to specify that ? In other words, I do not want to have to write some useless values for these properties on the segments, quad and triangles.
It is not possible to write values only for certain types of cells. Unstructured grids in VTK require a one-to-one value between cells and elements in a cell data array. The closest thing we support to not writing a data value for certain cells is writing a NaN for a cell type that has no value.
Another approach would involved breaking up your mesh into a vtkMultiBlockData set where one block has only cell types with common properties and another block has cells without that property. The block with the property can provide an array containing those values, but the other block would have no such array.
Yes, writing a vtm instead of a vtu is a great idea. I have managed to do what I want, thanks !
But the problem is for the Parallel version. I think a “.pvtm” format does nos exist. Also, a pvtu can’t refer to vtm files, but only vtu files. Have you got an idea for this ?