paulo-herrera / PyEVTK

EVTK (Export VTK) package allows exporting data to binary VTK files for visualization and data analysis
93 stars 23 forks source link

Storing vectors in gridToVtk #17

Open nfoppiani-pf opened 6 months ago

nfoppiani-pf commented 6 months ago

I would like to store a vector field on a structured grid using gridToVtk, but unfortunately pointData is supposed to be a dict of only scalar fields.

Can you explain why and what's preventing to extend this functionality to vector fields? Especially because the low level function _addDataToFile seems to handle vectors somehow.

Btw, I am sure it's possible to have vector fields - right now I am saving the components as scalar fields and assemble them as vectors using Paraview.

Thanks!

IdaRlt commented 2 months ago

I have a related issue. I found how to export vector field using the low level functions, but that doesn't seem to work for higher dimensions, such as tensors. Is there a way to handle tensors that that I haven't found ?

Thanks.

Ida.