How should the xml file for bezier geometries look like?

Hello

In my FE program i want to export some beizer cells so I can visualize them in paraview.
I cant find any documentation on how the cells/points/weights of the bezier cells should exported.

I am completely new to vtk, but in my understanding, the vtk output looks something like this:

    <Piece NumberOfPoints="9" NumberOfCells="4">
  <Points>
    <DataArray type="Float64" Name="Points" format="binary" NumberOfComponents="3">
        ....
</DataArray>
      </Points>
      <Cells>
        <DataArray type="Int32" Name="connectivity" format="binary" NumberOfComponents="1">
</DataArray>
        <DataArray type="Int32" Name="offsets" format="binary" NumberOfComponents="1">
           ....
</DataArray>
        <DataArray type="UInt8" Name="types" format="binary" NumberOfComponents="1">

</DataArray>

My question is, what xml-tags do I need in order to export bezier cells?
Also, is it possible to export bezier cells of any order?

Hopefully the question is clear :slight_smile:

Edit:

By looking at example outputs from regular cells, I was able to get a simple example with bezier quadrilatiral cell to work:

      <Cells>
    <DataArray type="Int32" Name="connectivity" Format="ascii">
       0 3 15 12 1 2 11 7 14 13 8 4 5 6 9 10
    </DataArray>
    <DataArray type="Int32" Name="offsets" Format="ascii">
      16
    </DataArray>
    <DataArray type="Int32" Name="types" Format="ascii">
      77
    </DataArray>
  </Cells>

So my questions are now:
How do I specify weights for the control points?
How does the reader now what order the quadrilateral will be?
How do I specify anisotropic bezier cell(different order in different directions)?

Hello again. I found out that there are test-files at https://gitlab.kitware.com/vtk/vtk/blob/master/Common/DataModel/Testing/Cxx/TestBezier.cxx that generates example .vtu files.

Unfortunately I am not able to compile vtk from source, so I cant run the test myself. Could someone send me the .vtu files that are generated by TestBezier.cxx? It would be greatly appreciated.

VTK_BEZIER_CURVE_quadratic_quarter_circle.vtu (4.9 KB) VTK_BEZIER_HEXAHEDRON_bilinearquadratic_quarteRingWithSquareSection.vtu (2.1 KB) VTK_BEZIER_HEXAHEDRON_triquadratic_cube.vtu (1.9 KB) VTK_BEZIER_HEXAHEDRON_triquartic_full_sphere.vtu (12.1 KB) VTK_BEZIER_QUADRILATERAL_linearquadratic_quarter_disk.vtu (1.9 KB) VTK_BEZIER_TETRA_quadratic.vtu (1.7 KB) VTK_BEZIER_TETRA_quartic_solidSphereOctant.vtu (2.6 KB) VTK_BEZIER_TRIANGLE_quadratic_full_disk.vtu (1.5 KB) VTK_BEZIER_TRIANGLE_quartic_sphereOctant.vtu (2.1 KB) VTK_BEZIER_WEDGE_biquadratic_quarterCylinder.vtu (1.8 KB) VTK_BEZIER_WEDGE_quarticLinear_thickSphereOctant.vtu (3.4 KB)

1 Like

Thank you very much!