You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to store 100x100 grid cells in a VTK file.
Along with the cells and points, I want to store 2 scalar values,
X = 100
Y = 100,
which represent the X and Y dimensions of the grid
The above values can not be stored as point_data or cell_data as X and Y are properties of the whole grid.
But the vtk_sections list present in _vtk_51.py does not have any section related to field data.
So what is the best way to store this?
As a workaround, I tried adding a FIELD_DATA section in the _vtk_51.py and made some changes to the write() and _read_section() methods.
This approach solves my issue, but I am not sure if this is valid from the domain point of view.
The text was updated successfully, but these errors were encountered:
I want to store 100x100 grid cells in a VTK file.
Along with the cells and points, I want to store 2 scalar values,
X = 100
Y = 100,
which represent the X and Y dimensions of the grid
The above values can not be stored as point_data or cell_data as X and Y are properties of the whole grid.
https://examples.vtk.org/site/Cxx/PolyData/FieldData/
The above link mentions that "For data that does not align with either points or cells, FieldData should be used"
The
Mesh
class has afield_data
attributeBut the
vtk_sections
list present in _vtk_51.py does not have any section related to field data.So what is the best way to store this?
As a workaround, I tried adding a FIELD_DATA section in the _vtk_51.py and made some changes to the
write()
and_read_section()
methods.This approach solves my issue, but I am not sure if this is valid from the domain point of view.
The text was updated successfully, but these errors were encountered: