<div dir="ltr"><div>I have write a new psurface-convert code to convert the psurface 
into vtu file format. The code (in new project dune-psurface-convert) is
 save is git://<a href="http://gitorious.org/dune-psurface-convert/dune-psurface-convert.git" target="_blank">gitorious.org/dune-psurface-convert/dune-psurface-convert.git</a><br>
</div><div>This is I have made use of  the vtu writer in 
/dune/grid/io/file/vtk/vtk writer.hh, instead of  the third party code. 
It is written in a more C++-like style. <br></div><div>The code could deal with the <a href="http://cube.par.am" target="_blank">cube.par.am</a> and <a href="http://sphere.par.am" target="_blank">sphere.par.am</a>. The out put is shown in the attachment. I have trouble reading the <a href="http://trice.par.am" target="_blank">trice.par.am</a>, with an error message of  "You're trying to read a file in the old-style AmiraMesh format.<br>

But the format is not supported anymore :-(".  <br><br></div><div>The amiramesh have the following information <br> 1) 'Patches'<br>  2) 'BaseGridVertexCoords<br>  3) 'BaseGridTriangles'<br>  4) 'NumNodesAndParameterEdgesPerTriangle'<br>

  5) 'Nodes'<br>   For each node, five floats are stored containing first the local position in<br>   barycentric coordinates on the respective triangle and x, y, and z-coordinates of   the image position.<br>  6) 'ParameterEdges'<br>

     All edges of the graphs on all triangles.  Each entry is a tuple of<br>     two integers storing the indices of the two endnodes of the edge.<br>     The counting starts anew for each triangle.  The three invented<br>

     corner nodes always have the indices 0, 1, and 2, respectively.<br>  7) 'EdgePoints <br>     <br></div><div>I
 stored the vertices (2) and nodes (5) (node positions) into point 
coordinates. The Triangles (3) and Edges (6) are stored as cell in vtu. 
Patches(1) is stored as cell data. The imagine position is stored as the
 point data on nodes and vertices. I have not figure out how to store 
Edge Points yet. <br>
</div><div>Do you think it is the right way to store the psurface information into vtu file? <br><br></div><div>Best,<br></div>Xiaoxue</div>