nschloe / meshio

:spider_web: input/output for many mesh formats
MIT License
1.85k stars 388 forks source link

xdmf: XML is default Format for DataItem #1432

Open slitvinov opened 10 months ago

slitvinov commented 10 months ago

According to Default XML Attributes Format=XML should be the default for DataItem element. This is a valid XDMF file

$ cat tri.xdmf
<Xdmf
    Version="2">
  <Domain>
    <Grid>
      <Topology
      TopologyType="Triangle"
      Dimensions="1">
    <DataItem
        Dimensions="1 3"
        NumberType="Int">
      0 1 2
    </DataItem>
      </Topology>
      <Geometry>
    <DataItem
        Dimensions="3 3">
      0 0 0
      1 0 0
      0 1 0
    </DataItem>
      </Geometry>
    </Grid>
  </Domain>
</Xdmf>

and meshio info returns after applying the modification.

$ meshio info tri.xdmf 
<meshio mesh object>
  Number of points: 3
  Number of cells:
    triangle: 1