[Paraview] XDMF writing problem

Eric E. Monson emonson at cs.duke.edu
Tue Jun 29 12:48:09 EDT 2010


Hello Samer,

You may need to explain a bit more what you mean by "the final result I got was not pleasing". 

It looks like there may be a problem in that you are defining 320x304x304 points for your grid, but you also are stating that the same number of Pressure attributes exist, centered on the cells. If you really have that many pressure values, you should probably put them as Center="Node", otherwise there should be one less value in each direction, as the cells will be implicitly defined between the points.

(Also, you probably already know this, but if your grid has a constant spacing in each direction you can either use 3DRectMesh or 3DCoRectMesh topology and not have to specify the XYZ positions of the points.)

If changing cell centered to point centered doesn't help, just explain a little more about what's not working and we'll try to help more. There is also an Xdmf mailing list, but this is an okay place to post for now if you're trying to load your data into ParaView.

Talk to you later,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Jun 29, 2010, at 11:19 AM, Samer Afach wrote:

> Hello programmers,
> 
> I'm new to this list, I'm not sure I'm asking in the right place, but
> I'll try to ask and I hope I'll get the answer I'm looking for :) .
> 
> I have an HDF5 file which is an array of 8-bit double 3D array of
> pressure values for a sample I have, the size of this array is
> 320x304x304. I'm trying to read this file to (visualise it in) Paraview,
> and I heard that I have to write an XDMF file for that. So I started
> reading about it, but the final result I got was not pleasing. I
> attached with this e-mail the XDMF file I wrote for this purpose
> (reading my data.h5 file).
> 
> Could someone please tell me what's wrong in my XDMF?
> 
> Thank you, any efforts are highly appreciated.
> 
> Regards,
> Samer Afach
> Institute for Computational physics, University of Stuttgart
> <?xml version="1.0" ?>
> <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
> <Xdmf Version="2.0">
>    <domain>
>   <Grid Name="mesh1" GridType="Uniform">
>   <Topology TopologyType="3DSMesh" NumberOfElements="304 304 320"/>
>     <Geometry GeometryType="X_Y_Z">
>       <DataItem Dimensions="304 304 320" NumberType="Float" Precision="8" Format="HDF">
>        data.h5:/X
>       </DataItem>
>       <DataItem Dimensions="304 304 320" NumberType="Float" Precision="8" Format="HDF">
>        data.h5:/Y
>       </DataItem>
>       <DataItem Dimensions="304 304 320" NumberType="Float" Precision="8" Format="HDF">
>        data.h5:/Z
>       </DataItem>
>     </Geometry>
>     <Attribute Name="Pressure" AttributeType="Scalar" Center="Cell">
>       <DataItem Dimensions="304 304 320" NumberType="Float" Precision="8" Format="HDF">
>        data.h5:/Pressure
>       </DataItem>
>     </Attribute>
>   </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



More information about the ParaView mailing list