[Gmsh] element coordinates and connectivity of mesh for FE processing

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Oct 7 21:13:27 CEST 2008


Umut Tabak wrote:
> Dear Gmshers,
> 
> Is there a readily available code that I can read the node coordinates 
> and the element connectivity tables in Gmsh. I want to generate element 
> matrices for some kind of academic problems(plates, 3D solids) to make 
> some tries for some new methods in the model reduction field.

It really depends on what you want to do: do you want to read the mesh 
from a file, or do you want to link Gmsh in your code as a library?

In the first case, just select a mesh format you like and write a small 
file reader. For the ".msh" format a C++ example is located (in the 
source code) in utils/misc/mshsort.cpp and a Matlab example in 
utils/converters/matlab.

In the second case, you need to build Gmsh as a library (make lib) and 
link it with your own solver. Then you can directly use Gmsh's internal 
API to make queries (see e.g. utils/misc/driver.cpp).



> 
> I checked the manual, there are some tips in the manual already but I 
> did not want to start coding right away, perhaps someone(or another open 
> source code) has done this before and shared the codes as well(hopefully).
> 
> Best wishes,
> 
> --
> U.T.
> --
> There are some things which cannot
> be learned quickly, and time, which is all we have,
> must be paid heavily for their acquiring.
> They are the very simplest things,
> and because it takes a man's life to know them
> the little new that each man gets from life
> is very costly and the only heritage he has to leave.
> - Ernest Hemingway 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine