[Paraview] XDMF writing problem

samer at icp.uni-stuttgart.de samer at icp.uni-stuttgart.de
Wed Jun 30 05:53:00 EDT 2010


Hello Eric,

Thank you for your answer. Actually what I mean with not pleasing, is that
the program is crashing a lot, giving this message in the terminal.

XDMF Error in
/build/buildd/paraview-3.4.0/Utilities/Xdmf2/libsrc/XdmfValuesHDF.cxx line
77 (Can't Open Dataset data.h5:/X)
XDMF Error in
/build/buildd/paraview-3.4.0/Utilities/Xdmf2/libsrc/XdmfDataItem.cxx line
498 (Reading Values Failed)
XDMF Error in
/build/buildd/paraview-3.4.0/Utilities/Xdmf2/libsrc/XdmfGrid.cxx line 607
(Error in Update() of Geometry)
Segmentation fault

I'm aware that my data does not contain XYZ information, it only contains
pressure data, but when I remove the XYZ information from my XDMF I get a
null shape in paraview (of course, because there won't be a geometry
then), and the "volume" preview is wouldn't be available, only surface and
some other useless choices, and they all give empty views. Therefore I'm
not sure how I can tell the program that those pressures correspond to a
grid.

Starting from the very beginning, I got this file "data.h5" from someone
telling me that it's the output of some analysis for pressure. I need to
visualise this file to understand the type before I do the analysis on my
sample. I used the program hdfview to view its contents, and I found that
it's a 3D matrix of 8-byte doubles, every double contains a pressure, and
the dimensions of this matrix is 320x304x304, and this is the only
information I have.

The size of the file is 225 MB, which is equal to: 8*304*304*320 bytes. In
other words the data file does not contain any other information about the
coordinates.

I wrote this XDMF file while I don't really understand what I'm doing,
it's just the first step, so I don't know anything like different mesh(s)
and so on.

I expected to get a 3D view for my samples with different colours per
pressure, isn't this what I should get?

Now the question, does it suffice to state only the pressure information
in the XDMF file without coordinates? and what should paraview show me for
such data? is it colour per voxel as I expected? is what I'm doing the
right way to visualise this data?

For convenience, I uploaded the data file to Megaupload, please find it at

http://www.megaupload.com/?d=F8M6XU4D

Thank you, I really appreciate the time you're using for this.

Best regards,
Samer



> 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