[Gmsh] msh format
Mikhail Titov
mlt at gmx.us
Fri Nov 19 17:03:51 CET 2010
Marco:
File format is well documented.
Actual number of nodes used in elements can be calculated in case you have orphaned nodes (you shouldn't have if you define physical surface). If you like perl, you can use hash with dummy value assigned and then count number of keys to get the number of nodes used to define elements.
If you was working with projected coordinates, GDAL can help you. See http://search.cpan.org/dist/Geo-GDAL/ for perl solution.
Mikhail
From: gmsh-bounces at ace20.montefiore.ulg.ac.be [mailto:gmsh-bounces at ace20.montefiore.ulg.ac.be] On Behalf Of Marco Bajo
Sent: Saturday, November 13, 2010 5:49 PM
To: gmsh at geuz.org
Subject: [Gmsh] msh format
Dear developers,
I'm using Gmsh to create a triangular 2D grid of the Adriatic Sea. The hydrodynamic model
I'm using doesn't support the msh format, so I thought to write a perl script to convert it.
I need only the following parameters:
id_node1 lon1 lat1
id_node2 lon2 lat2
....
id_elem1 id_node_a1 id_node_b1 id_node_c1
id_elem2 id_node_a2 id_node_b2 id_node_c2
....
I don't know how to extract the coordinates of the nodes in lat-lon and the
numbers of the nodes used in the elements.
Can you help me?
Thank you,
Marco