# connect blocks in a multi-block grid using xdmf

**URL:** https://discourse.paraview.org/t/connect-blocks-in-a-multi-block-grid-using-xdmf/5483
**Category:** ParaView Support
**Created:** [October 3, 2020, 3:57pm UTC](https://discourse.paraview.org/t/connect-blocks-in-a-multi-block-grid-using-xdmf/5483 "2020-10-03T15:57:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pcosta](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pcosta/32/5067_2.png) [@pcosta](https://discourse.paraview.org/u/pcosta)
#### Post date: [October 3, 2020, 3:57pm UTC](https://discourse.paraview.org/t/connect-blocks-in-a-multi-block-grid-using-xdmf/5483/1 "2020-10-03T15:57:20Z")

</div>

Hi all,

I have a multi-block grid, which manage to visualize using raw binary data and the xdmf file format in paraview. A minimal example of what I have is as follows:

```xml
 <?xml version="1.0" ?>
 <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
 <Xdmf xmlns:xi="http://www.w3.org/2001/XInclude" Version="2.0">
     <Domain>
         <Topology name="TOPO_b_001" TopologyType="3DRectMesh" Dimensions="64 128 2"/>
         <Geometry name="GEO_b_001" GeometryType="VXVYVZ">
             <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Dimensions="2">x_b_001.bin</DataItem>
             <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Dimensions="128">y_b_001.bin</DataItem>
             <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Dimensions="64">z_b_001.bin</DataItem>
         </Geometry>
         <Topology name="TOPO_b_002" TopologyType="3DRectMesh" Dimensions="64 64 2"/>
         <Geometry name="GEO_b_002" GeometryType="VXVYVZ">
             <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Dimensions="2">x_b_002.bin</DataItem>
             <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Dimensions="64">y_b_002.bin</DataItem>
             <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Dimensions="64">z_b_002.bin</DataItem>
         </Geometry>
         <Grid Name="TimeSeries" GridType="Collection" CollectionType="Temporal">
             <Grid Name="T0000000_ALL" GridType="Collection" CollectionType="Spatial">
                 <Time Value=" 0.000000E+00"/>
                 <Grid Name="T0000000_b_001" GridType="Uniform">
                     <Topology Reference="/Xdmf/Domain/Topology[1]"/>
                     <Geometry Reference="/Xdmf/Domain/Geometry[1]"/>
                     <Attribute AttributeType="Scalar" Name="Pressure_P" Center="Node">
                         <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Seek="0" Dimensions="64 128 2">pre_fld_0000000_b_001.bin</DataItem>
                     </Attribute>
                 </Grid>
                 <Grid Name="T0000000_b_002" GridType="Uniform">
                     <Topology Reference="/Xdmf/Domain/Topology[2]"/>
                     <Geometry Reference="/Xdmf/Domain/Geometry[2]"/>
                     <Attribute AttributeType="Scalar" Name="Pressure_P" Center="Node">
                         <DataItem Format="Binary" DataType="Float" Precision="8" Endian="Native" Seek="0" Dimensions="64 64 2">pre_fld_0000000_b_002.bin</DataItem>
                     </Attribute>
                 </Grid>
             </Grid>
         </Grid>
     </Domain>
 </Xdmf>

```

And the resulting visualization is as in this figure:

 ![blocks](https://discourse.paraview.org/uploads/default/original/2X/0/0737fea5efa77ee3bec9a7fa468211ec4c9ef522.png)

As you can see, the blocks are not connected, and each grid is treated independently. Do you know how I can ‘connect’ them (e.g. such that if I would compute the stream traces they would go from one block to the other)? The merge blocks filter does not do the job. I think I’m missing something in the setting up of my file to specify how the blocks are connected to each other.

Thank you!

---

<div class="post-metadata">

### Author: ![pcosta](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pcosta/32/5067_2.png) [@pcosta](https://discourse.paraview.org/u/pcosta)
#### Post date: [October 9, 2020, 9:48pm UTC](https://discourse.paraview.org/t/connect-blocks-in-a-multi-block-grid-using-xdmf/5483/2 "2020-10-09T21:48:35Z")

</div>

I guess what I am looking for is the `XDMF` equivalent of the `VTK Whole Extent` / `Piece Extent` to represent a subset of the domain (e.g. like below). Is there any way to achieve this with `XDMF`?

```xml
  <VTKFile type=”PRectilinearGrid” ...>
    <PRectilinearGrid WholeExtent=”x1 x2 y1 y2 z1 z2”
                      GhostLevel=”#”>
      <PPointData>...</PPointData>
      <PCellData>...</PCellData>
      <PCoordinates>...</PCoordinates>
      <Piece Extent=”x1 x2 y1 y2 z1 z2”
             Source=”rectilinearGrid0.vtr”/>
      ...
    </PRectilinearGrid>
  </VTKFile>

```
