[Dune-devel] Updates on psurface convert

Xiaoxue Gong xiaoxue198912 at gmail.com
Thu Jul 25 22:13:06 CEST 2013


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://gitorious.org/dune-psurface-convert/dune-psurface-convert.git
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.
The code could deal with the cube.par.am and sphere.par.am. The out put is
shown in the attachment. I have trouble reading the trice.par.am, with an
error message of  "You're trying to read a file in the old-style AmiraMesh
format.
But the format is not supported anymore :-(".

The amiramesh have the following information
 1) 'Patches'
  2) 'BaseGridVertexCoords
  3) 'BaseGridTriangles'
  4) 'NumNodesAndParameterEdgesPerTriangle'
  5) 'Nodes'
   For each node, five floats are stored containing first the local
position in
   barycentric coordinates on the respective triangle and x, y, and
z-coordinates of   the image position.
  6) 'ParameterEdges'
     All edges of the graphs on all triangles.  Each entry is a tuple of
     two integers storing the indices of the two endnodes of the edge.
     The counting starts anew for each triangle.  The three invented
     corner nodes always have the indices 0, 1, and 2, respectively.
  7) 'EdgePoints

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.
Do you think it is the right way to store the psurface information into vtu
file?

Best,
Xiaoxue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20130725/c2de4094/attachment.htm>


More information about the Dune-devel mailing list