Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support direction dependent degrees for VTK_LAGRANGE_QUADRILATERAL cells #110

Closed
lcw opened this issue Sep 15, 2022 · 2 comments
Closed

Comments

@lcw
Copy link
Contributor

lcw commented Sep 15, 2022

To support direction dependent degrees for VTK_LAGRANGE_QUADRILATERAL cells I need to add an attribute to the CellData tag, i.e., <CellData HigherOrderDegrees="HigherOrderDegrees">, along with the cell data. For reference see https://gitlab.kitware.com/paraview/paraview/-/issues/21550.

Adding the cell data is straight forward using the supplied interface but I don't know the best way to add the attribute. My first shot was

xroot = WriteVTK.LightXML.root(pvtk.vtk.xdoc)
xgrid = WriteVTK.LightXML.find_element(xroot, pvtk.vtk.grid_type)
xpiece = WriteVTK.LightXML.find_element(xgrid, "Piece")
xcelldata = WriteVTK.LightXML.find_element(xpiece, "CellData")
WriteVTK.LightXML.set_attribute(xcelldata, "HigherOrderDegrees", "HigherOrderDegrees")

which works except that the attribute doesn't propagate to the PCellData tag in the pvtu file.

Is there an interface for this already? If not what do you think about the following?

vtk[VTKCellData()] = Dict("HigherOrderDegrees"=>"HigherOrderDegrees")

This would loop through the key value pairs and add them as attributes to the CellData tag. Then _update_pvtk!(pvtk::PVTKFile) would copy all CellData attributes to PCellData.

@lcw
Copy link
Contributor Author

lcw commented Sep 16, 2022

I took a first cut at this here #111.

@lcw
Copy link
Contributor Author

lcw commented Sep 19, 2022

Fixed by #111.

@lcw lcw closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant