# XDMF - Extract component from vector field using Hyperslab

**URL:** https://discourse.paraview.org/t/xdmf-extract-component-from-vector-field-using-hyperslab/394
**Category:** ParaView Support
**Created:** [August 7, 2018, 8:41am UTC](https://discourse.paraview.org/t/xdmf-extract-component-from-vector-field-using-hyperslab/394 "2018-08-07T08:41:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 7, 2018, 8:41am UTC](https://discourse.paraview.org/t/xdmf-extract-component-from-vector-field-using-hyperslab/394/1 "2018-08-07T08:41:43Z")

</div>

Dear all,

I am trying to load a single component of a vector field stored in the file `uvw_000001.bin`.

I am using the XDMF file below which loads the field values into the variable `q` just fine, i.e. I can view its components in Paraview.

The second variable `u` where I try to extract the first component of the vector field is not available in Paraview.

What am I doing wrong?

```
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>

<Xdmf Version="3.0">

  <Domain>
    
    <Grid Name="staggered_east" GridType="Uniform">
      
      <Topology TopologyType="3DRectMesh" NumberOfElements="34 34 34"/>
      
      <Geometry GeometryType="VXVYVZ">
        <DataItem Dimensions="34" NumberType="Float" Precision="4" Format="XML">   
          0.0000000000000000 0.10000000000000001 0.20000000000000001 0.30000000000000004 0.40000000000000002 0.50000000000000000 0.60000000000000020 0.70000000000000007 0.80000000000000004 0.90000000000000002 1.0000000000000000 1.1000000000000001 1.2000000000000002 1.3000000000000000 1.4000000000000001 1.5000000000000000 1.6000000000000001 1.7000000000000002 1.8000000000000000 1.9000000000000001 2.0000000000000000 2.1000000000000001 2.2000000000000002 2.3000000000000003 2.4000000000000004 2.5000000000000000 2.6000000000000001 2.7000000000000002 2.8000000000000003 2.9000000000000004 3.0000000000000000 3.1000000000000001 3.2000000000000002 3.3000000000000003
        </DataItem>
        <DataItem Dimensions="34" NumberType="Float" Precision="4" Format="XML">   
          -5.0000000000000003E-002 5.0000000000000003E-002 0.15000000000000002 0.25000000000000000 0.35000000000000003 0.45000000000000001 0.55000000000000004 0.65000000000000013 0.75000000000000000 0.85000000000000009 0.94999999999999996 1.0500000000000000 1.1500000000000001 1.2500000000000000 1.3500000000000001 1.4500000000000002 1.5500000000000000 1.6500000000000001 1.7500000000000000 1.8500000000000001 1.9500000000000002 2.0499999999999998 2.1500000000000004 2.2500000000000000 2.3500000000000005 2.4500000000000002 2.5499999999999998 2.6500000000000004 2.7500000000000000 2.8500000000000005 2.9500000000000002 3.0499999999999998 3.1500000000000004 3.2500000000000000 
        </DataItem>
        <DataItem Dimensions="34" NumberType="Float" Precision="4" Format="XML">   
          -5.0000000000000003E-002 5.0000000000000003E-002 0.15000000000000002 0.25000000000000000 0.35000000000000003 0.45000000000000001 0.55000000000000004 0.65000000000000013 0.75000000000000000 0.85000000000000009 0.94999999999999996 1.0500000000000000 1.1500000000000001 1.2500000000000000 1.3500000000000001 1.4500000000000002 1.5500000000000000 1.6500000000000001 1.7500000000000000 1.8500000000000001 1.9500000000000002 2.0499999999999998 2.1500000000000004 2.2500000000000000 2.3500000000000005 2.4500000000000002 2.5499999999999998 2.6500000000000004 2.7500000000000000 2.8500000000000005 2.9500000000000002 3.0499999999999998 3.1500000000000004 3.2500000000000000 
        </DataItem>
      </Geometry>
      
      
      <Attribute Name="q" AttributeType="Scalar" Center="Node">
        
        <DataItem 
          ItemType="Uniform"
          Name="uvw_s"
          Format="Binary"
          Dimensions="34 34 34 3"
          DataType="Float" Precision="8" Endian="Big" Seek="8"
          >
          uvw_000001.bin
        </DataItem>
      
      </Attribute>
      
      
      <Attribute Name="u" AttributeType="Scalar" Center="Node">
        
        <DataItem 
          ItemType="HyperSlab"
          Dimensions="34 34 34 1"
          Type="HyperSlab">
          
          <DataItem
            Dimensions="3 4"
            Format="XML">
            0 0 0 0
            1 1 1 1
            34 34 34 1
          </DataItem>
          
          <DataItem 
            ItemType="Uniform"
            Name="uvw"
            Format="Binary"
            Dimensions="34 34 34 3"
            DataType="Float" Precision="8" Endian="Big" Seek="8"
            >
            uvw_000001.bin
          </DataItem>
          
        </DataItem>
        
      </Attribute>
      
      
    </Grid>
    
  </Domain>

</Xdmf>

```

[uvw\_000001.bin](https://discourse.paraview.org/uploads/default/original/1X/0794a1ab5ea7640b197aa0e6cc7a340c09cfe3e2.bin) (921.2 KB)

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 7, 2018, 9:02am UTC](https://discourse.paraview.org/t/xdmf-extract-component-from-vector-field-using-hyperslab/394/2 "2018-08-07T09:02:01Z")

</div>

interestingly, if I use the xdmf importer instead of the xdmf3 importer, then the following code extracts the first vector component as I would expected.

```
<DataItem 
  ItemType="HyperSlab"
  Dimensions="34 34 34 1"
  Type="HyperSlab">
  
  <DataItem
    Dimensions="3 4"
    Format="XML">
    0 0 0 0
    1 1 1 1
    34 34 34 1
  </DataItem>
  
  <DataItem 
    ItemType="Uniform"
    Name="uvw"
    Format="Binary"
    Dimensions="34 34 34 3"
    DataType="Float" Precision="8" Endian="Big" Seek="8"
    >
    uvw_000001.bin
  </DataItem>
  
</DataItem>

```

How can this behavior be achieved when using the xdmf3 reader?
