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>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to