[Paraview] SubSet grid type in Xdmf

George Zagaris george.zagaris at kitware.com
Thu Apr 14 15:14:08 EDT 2011


Hi Tim,

The quickest way to get this working today is to add an IBLANK CellArray
to your dataset and flag the cells that you want to turn off. Then,
in ParaView, you can turn off those cells by thresholding based on
the IBLANK.

The best approach for structured AMR is to store your data in a
hierarchical box dataset  (*.vthb).
When the hierarchical box dataset is read (a) the blanking is computed
automatically
and (b) blanking is respected when visualizing the dataset. Both (a) &
(b) features are available
in development versions of ParaView/VTK available:
https://www.gitorious.org/~gxzaga/

However, this datatype is restricted to Berger-Collela AMR where:
(1) All grids are Cartesian
(2) Grids within the same level do not overlap
(3) All refinement ratios are integer (e.g. 2,4, etc.)
(4) Grid cells are never partially refined.

Hope this help.

Best Regards,
George


>
> Message: 1
> Date: Thu, 14 Apr 2011 13:18:35 -0400 (EDT)
> From: Tim Gallagher <tim.gallagher at gatech.edu>
> Subject: [Paraview] SubSet grid type in Xdmf
> To: xdmf at lists.kitware.com, paraview at paraview.org
> Message-ID:
>        <519234131.865792.1302801515948.JavaMail.root at mail2.gatech.edu>
> Content-Type: text/plain; charset=utf-8
>
> Hi,
>
> I'm working on an AMR problem and I'm trying to store the grid with Xdmf. In the CGNS file format, there was an OversetHoles node type that defined a list of cells in one grid that should be "turned off" because another set of cells has that information.
>
> I was thinking that the SubSet grid type inside a tree grid type would work, but it doesn't seem to. Specifically I am writing the coarse level grid as a structured mesh and then creating the refined cells in a subset grid. Is there some standard way in Xdmf to indicate that some cells should not be shown?
>
> When I try it with SubSet, I get the following error:
>
> XDMF Error in /home/kitware/Kitware/ParaView-3.10/source/Utilities/Xdmf2/libsrc/XdmfTopology.cxx line 449 (Grid is Structured: No Connectivity)
> HDF5-DIAG: Error detected in HDF5 (1.8.5-post2) thread 0:
>  #000: /home/kitware/Kitware/ParaView-3.10/source/VTK/Utilities/vtkhdf5/src/H5S.c line 1187 in vtk__H5Sset_extent_simple(): invalid dimension size
>    major: Invalid arguments to routine
>    minor: Bad value
> Segmentation fault
>
> Obviously the issue is the connectivity between the refined cells and the coarse cells since both are structured.
>
> To get around this, I tried making both grids as a 3DSMesh, which creates essentially a second block of cells inside a cell on the coarse level. But in this case, Paraview renders both grids which causes visualization issues.
>
> I'm copying the Paraview mailing list on this also in case this is something more related to visualizing rather than storing the data. Also, attached is a simple xmf file that illustrates what I'm trying to do.
>
> If anybody has any suggestions on the best way to go about this, I'd really appreciate it. The only solution I've come up with so far is to write all levels as a single, unstructured grid, but that will take a lot of coding since our actual code still treats all levels as structured grids. So I would like to avoid it if it's possible.
>
> Thanks,
>
> Tim
>
> <Xdmf Version="2.1">
>  <Domain>
>    <Grid GridType="Tree" Name="Test Grid">
>      <Grid Name="Coarse Grid" GridType="Uniform">
>        <Topology TopologyType="3DSMesh" Dimensions="2 3 3 3" />
>        <Geometry GeometryType="XYZ">
>          <DataItem Format="XML" NumberType="Float" Dimensions="2 3 3 3">
>            0.0 0.0 0.0
>            1.0 0.0 0.0
>            2.0 0.0 0.0
>            0.0 1.0 0.0
>            1.0 1.0 0.0
>            2.0 1.0 0.0
>            0.0 2.0 0.0
>            1.0 2.0 0.0
>            2.0 2.0 0.0
>            0.0 0.0 1.0
>            1.0 0.0 1.0
>            2.0 0.0 1.0
>            0.0 1.0 1.0
>            1.0 1.0 1.0
>            2.0 1.0 1.0
>            0.0 2.0 1.0
>            1.0 2.0 1.0
>            2.0 2.0 1.0
>          </DataItem>
>        </Geometry>
>        <Attribute Name="Values" Center="Cell">
>          <DataItem Format="XML" Dimensions="1 2 2">
>            0.0 10000.0
>            0.0 0.0
>          </DataItem>
>        </Attribute>
>      </Grid>
> <!--      <Grid Name="Fine Grid" GridType="SubSet" Section="DataItem">
>        <DataItem DataType="Int" Dimensions="3" Format="XML">
>          0 1 0
>        </DataItem>
>        <Grid Name="Target" Reference="XML">
>          /Xdmf/Domain/Grid[@Name="Test Grid"]/Grid[@Name="Coarse Grid"]
>        </Grid> -->
>      <Grid Name="Fine Grid" GridType="Uniform">
>        <Topology TopologyType="3DSMesh" Dimensions="2 3 3 3" />
>        <Geometry GeometryType="XYZ">
>          <DataItem Format="XML" NumberType="Float" Dimensions="2 3 3 3">
>            1.0 0.0 0.0
>            1.5 0.0 0.0
>            2.0 0.0 0.0
>            1.0 0.5 0.0
>            1.5 0.5 0.0
>            2.0 0.5 0.0
>            1.0 1.0 0.0
>            1.5 1.0 0.0
>            2.0 1.0 0.0
>            1.0 0.0 1.0
>            1.5 0.0 1.0
>            2.0 0.0 1.0
>            1.0 0.5 1.0
>            1.5 0.5 1.0
>            2.0 0.5 1.0
>            1.0 1.0 1.0
>            1.5 1.0 1.0
>            2.0 1.0 1.0
>          </DataItem>
>        </Geometry>
>        <Attribute Name="Values" Center="Cell">
>          <DataItem Format="XML" Dimensions="1 2 2">
>            10.0 10.0
>            10.0 10.0
>          </DataItem>
>        </Attribute>
>      </Grid>
>    </Grid>
>  </Domain>
> </Xdmf>
>
>


More information about the ParaView mailing list