Strange definition of RationalWeights in *.vtu files for Rational Bézier cells
Description
Recently, support for Implementation of Rational Bézier Cells into VTK was introduced and added to paraview. This is a very important feature for me and I'm using it a lot. Sadly I have some problems with the definition of the .vtu
files for those higher order Bézier cells.
The files
VTK_BEZIER_QUADRILATERAL_quadratic_full_disk.vtu
VTK_BEZIER_QUADRILATERAL_quadratic_full_disk_error.vtu
only differ in the definition of PointData
and CellData
fields. For getting paraview understand those files we have to write
<PointData RationalWeights="RationalWeights">
<DataArray type="Float64" Name="RationalWeights">
1
1
1
1
0.70710678118
0.70710678118
0.70710678118
0.70710678118
1
</DataArray>
</PointData>
instead of
<PointData>
<DataArray type="Float64" Name="RationalWeights">
1
1
1
1
0.70710678118
0.70710678118
0.70710678118
0.70710678118
1
</DataArray>
</PointData>
Otherwise the RationalWeights
are omitted and the representation is wrong. That seems strange to me since
<CellData HigherOrderDegrees="HigherOrderDegrees">
<DataArray type="Float64" Name="HigherOrderDegrees" NumberOfComponents="3">
2
2
0
</DataArray>
</CellData>
is not necessary and it is sufficient to write
<CellData>
<DataArray type="Float64" Name="HigherOrderDegrees" NumberOfComponents="3">
2
2
0
</DataArray>
</CellData>
Questions
- Is this an intended behavior?
- Is there a better solution?
Comments
- It seems very redundant to me since the subsequent
DataArray
's already have the attributeName="HigherOrderDegrees"
. So it should be possible to identify them in a unique way. - With the current solution it is strange to have multiple
DataArray
's in the samePointData
section described with<PointData RationalWeights="RationalWeights">
. I think most XML writer will have problems with that as meshio which I'm heavily using for writing*.vtu
files.