[Paraview] Import of XDMF/HDF5:Cell centered attribute of 2D Rectangular grid

dkxls23 at gmail.com dkxls23 at gmail.com
Fri Mar 6 16:55:37 EST 2015


I have had similar problems with 2D structured grids and XDMF in the past.
I never got them to work in ParaView.

I solved the problem by using 3D grids and set the first dimension (i.e. the slowest varying) one to 1, the same way as you have done it with VXVYVZ.
You just have to adjust your data arrays accordingly, i.e. dimensions 1 82 221 in your example.

I can send you a working xdmf file when back in the office.

I believe the computational overhead from 2D to 3D grids with effectively 2 dimensions is rather small.

Maybe the next-generation XDMF reader in ParaView works better for 2D structued grids  or somebody with the knowledge explains us how to write them correctly. :)

-Armin



On Fri Mar 6 23:17:52 2015 GMT+0200, Canis Major wrote:
> I have troubles importing xdmf output to paraview.
> 
> This is an example of xdmf of 0th iteration.
> 
> <?xml version="1.0" ?>
> <Xdmf>
>  <Domain>
>    <Grid Name="Grid" GridType="Uniform">
>      <Topology TopologyType="2DRectMesh" Dimensions="1 82 221"/>
>      <Geometry GeometryType="VXVYVZ">
> 
>        <DataItem Dimensions="1" NumberType="Float" Precision="4" Format="HDF">
>         xdmf2d.h5:/Z
>        </DataItem>
> 
> <DataItem Dimensions="83" NumberType="Float" Precision="4" Format="HDF">
> xdmf2d.h5:/Y </DataItem>
> 
> <DataItem Dimensions="221" NumberType="Float" Precision="4" Format="HDF">
> xdmf2d.h5:/X </DataItem> </Geometry>
> 
>       <Attribute Name="pressure" AttributeType="Scalar" Center="Cell">
>         <DataItem Dimensions="82 220" NumberType="Float" Precision="4"
> Format="HDF">
>          xdmf2d.0.h5:/pressure
>         </DataItem>
>       </Attribute>
> 
>   </Grid>
>  </Domain>
> </Xdmf>
> 
> 
> I have an error that paraview failed to import attribute. What could
> be wrong? I have played around the parameters nothing helps.
>

-- 
Sent from my Jolla


More information about the ParaView mailing list