[Paraview] Xdmf reader subsets?

Andrew Ho andrewh0 at uw.edu
Thu Dec 31 15:06:58 EST 2015


I am trying to read an Xdmf subset into Paraview 4.4, but I get the
assertion (debug build):

*vtkXdmfHeavyData.cxx:293: vtkDataObject
*vtkXdmfHeavyData::ReadUniformData(xdm**f2::XdmfGrid *, int): Assertion
`xmfGrid->IsUniform() && "Input must be a uniform xdmf grid."' failed.*

I dug through the backtrace, and it seems that
*vtkXdmfHeavyData::ReadData(XdmfGrid*
xmfGrid, int blockId)* is incorrectly forwarding the Subset grid to the
vtkXdmfHeavyData::ReadUniformData function.

Here's a self-contained XDMF file to test with:

<?xml version="1.0" encoding="utf-8"?>
<Xdmf Version="2.0">
  <Domain>
    <Grid Name="full" GridType="Uniform">
      <Topology NumberOfElements="3" TopologyType="Triangle">
        <DataItem Dimensions="3 3" Format="XML" ItemType="Uniform"
Name="connectivity" NumberType="Int" Precision="4">
          0 1 2
          3 4 5
          6 7 8
        </DataItem>
      </Topology>
      <Geometry GeometryType="XYZ">
        <DataItem Dimensions="9 3" Format="XML" ItemType="Uniform"
Name="coordinates" NumberType="Float" Precision="8">
          0. 0. 0.
          1. 0. 0.
          0. 1. 0.
          1. 0. 0.
          2. 0. 0.
          1. 1. 0.
          2. 0. 0.
          3. 0. 0.
          2. 1. 0.
        </DataItem>
      </Geometry>
    </Grid>
    <Grid Name="subs" GridType="Subset" Section="DataItem">
      <DataItem
          DataType="Int"
          Dimensions="2"
          Format="XML">
        0 2
      </DataItem>
      <Grid Name="domain" GridType="Uniform" Reference="XML">
        /Xdmf/Domain/Grid[1]
      </Grid>
    </Grid>
  </Domain>
</Xdmf>

I'm relatively confident that this should be a valid XDMF file, but I'm not
positive since I wrote this by hand and the documentation for subsets is
relatively sparse.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151231/faf8e5b7/attachment.html>


More information about the ParaView mailing list