On 04.01.2013 04:19, Pradeep Jha wrote:
> Hello Jens,
> thanks for the response. It explained a lot.
Pleasure!
> I have been reading up about XDMF and am trying to implement it. My
> filename.h5 file just contains a scalar value for 512*512*512 grid points in
> a structured uniform cube. I don't store any grid coordinates information in
> any files. But all the material I have been reading for XDMF mention that I
> have to give grid information. Is there a simple way of conveying my uniform
> grid structure to XDMF or should I create a file with grid coordinates and
> make XDMF read it?
In this simple case, you do not need a grid file with coordinates, but you need
to specify the type of grid and its origin and cell size so PV knows where to
locate the cells and what numbers to draw along the axes. The (untested) sample
file below should give you an idea of what is needed. This grid cube has its
origin at [0,0,0] and uses dx=dy=dz=0.1, i.e. it occupies the cubic volume [0,
51.2]^3 in 3D space. Note that the grid size (513^3) has to be larger than the
number of data elements by one per direction because it specifies the location
of _nodes_ (corner vertices) of a cell.
You will need to adapt the path and name of the HDF5 file and the location of
your scalar data field within that file, the former being separated from the
latter by a ":".
Good luck!
Jens.
======================== BEGIN file scalar_sample.xmf ===============
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf>
<Domain>
<Grid Name="my_Grid" GridType="Uniform">
<Topology TopologyType="3DCoRectMesh" Dimensions="513 513 513">
</Topology>
<Geometry GeometryType="Origin_DxDyDz">
<DataItem Dimensions="3" NumberType="Float" Format="XML">
0 0 0
</DataItem>
<DataItem Dimensions="3" NumberType="Float" Format="XML">
0.1 0.1 0.1
</DataItem>
</Geometry>
<Attribute Name="my_Scalar" AttributeType="Scalar" Center="Cell">
<DataItem Dimensions="512 512 512" NumberType="Float" Format="HDF">
my_HDF_file.h5:/name_of_scalar_in_h5
</DataItem>
</Attribute>
</Grid>
</Domain>
</Xdmf>
========================= END file scalar_sample.xmf ================
_______________________________________________
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