<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi!<br>I惴 trying to write my data in the xdmf-format and read it in paraview. I have a 3D - curvilinear grid, i.e. I have to specify every point with its coordinates and then I have scalar attribute data, to be assigned to each node. <br>The .xmf meta-data file is recognised by paraview and works fine, but when I click the "Apply"- button, paraview crashes. I believe that I get the .h5 files wrong, when I write them (as I don愒 get the Xdmf-API to work, I writing the .xmf-file "manually" with a program and the .h5-files with the HDF5-API. <br>Does anyone know how to set the parameters for writing the correct .h5-file (Rank, and the shape of the array which is written to the file)? <br>This is as I have it now:<br><br>The coordinate file, which has (in this case) the dimensions 350 140 1. <br>I write the coordinates in the following array:<br>float* Coordinates;<br>Coordinates = new float [3*xdims];<br>int j=0; //counter<br><br>//write xCoord to array<br>for(i=0;i<xdims;i=i+3) <br> {Coordinates[i] = xPoints[j];<br> j++;<br> }<br>//write yCoord to array<br>j=0;<br>for(i=1;i<xdims;i=i+3) <br> {Coordinates[i] = yPoints[j];<br> j++;<br> }<br>//write zCoord to array<br>for(i=2;i<xdims;i=i+3) <br> {Coordinates[i] = 0.0;<br> }<br><br>This array obviously has rank 1, so I write the .h5 file with the following parameters:<br><br>file = H5Fcreate(H5FileName.c_str(), H5F_ACC_TRUNC , H5P_DEFAULT, H5P_DEFAULT);<br>dataspace = H5Screate_simple(1, dims, NULL);<br>datatype = H5Tcopy(H5T_NATIVE_FLOAT);<br>status = H5Tset_order(datatype,H5T_ORDER_LE);<br>dataset = H5Dcreate2(file,DATASETNAME1,datatype,dataspace,H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);<br>status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, Coordinates);<br><br><br>The attribute data files I write analogue. <br><br>My .xmf file looks like this:<br><?xml version="1.0" ?><br><!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []><br><br><Xdmf><br><Domain><br><Grid Name="Curvilinear" GridType="Uniform"><br><Topology TopologyType="3DSMesh" Dimensions ="350 140 1"><br></Topology><Geometry GeometryType="XYZ"><br><DataItem DataType="Float" Precision="4" Dimensions="350 140 1" Format="HDF"><br>C:\Dokumente und Einstellungen\User1\Eigene Dateien\xdmf_files\c1d-T132-30SEPT-deep_coord_00000.h5/Curvilinear/XYZ<br></DataItem><br></Geometry><br><Attribute Name="Density" Active="1" Type="Scalar" Center="Node"><br><DataItem DataType="Float" Precision="4" Dimensions="350 140 1" Format="HDF"><br>C:\Dokumente und Einstellungen\User1\Eigene Dateien\xdmf_files\c1d-T132-30SEPT-deep.p_00000.h5:/Curvilinear/Density<br></DataItem><br></Attribute><br></Grid><br></Domain><br></Xdmf><br><br>Any help would be appreciated!<br>Thx,<br>NH<br><br><br><br><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>