[Paraview] Import of XDMF/HDF5:Cell centered attribute of 2D Rectangular grid
Tim Gallagher
tim.gallagher at gatech.edu
Fri Mar 6 17:54:38 EST 2015
Hi guys,
So the problems you're having are due to specifying inconsistent data here. You are specifying a 2DRectMesh grid but then giving it 3 vectors for the points. I don't have your HDF5 files so I made a light data XMF file that works for me on all versions going back to 3.14. I have attached it here for you to test.
This all works fine. I've also created a 3DRectMesh. For that, you need to give it 2 points in the 3rd direction for the grid because you are specifying cell centered data. If you only give it 1 point in the 3rd direction, there is no "cell" anymore in which to specify the data.
I'll leave adding the 3rd dimension as an exercise for you to work with. Once you figure out how it needs to work using the light data format, then switch over to using the heavy data format and get it working again.
Hope that helps,
Tim
----- Original Message -----
From: dkxls23 at gmail.com
To: canismajorwuff at gmail.com
Cc: paraview at paraview.org
Sent: Friday, March 6, 2015 4:55:37 PM
Subject: Re: [Paraview] Import of XDMF/HDF5:Cell centered attribute of 2D Rectangular grid
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
_______________________________________________
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
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.xmf
Type: audio/x-xmf
Size: 934 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150306/b6404342/attachment.bin>
More information about the ParaView
mailing list