[Gmsh] Extract mesh info from C++ API classes

David Bernstein david at terafrac.org
Wed Feb 12 18:21:02 CET 2014


I think an introduction to the API would be helpful.  Since there are a number of users with experience using the API would a collaborative document be possible?  Perhaps using something like

https://www.authorea.com/

Just an idea...

On Feb 12, 2014, at 8:02 AM, Christophe Geuzaine <cgeuzaine at ulg.ac.be> wrote:

> 
> On 11 Feb 2014, at 11:38, Sacconi, Andrea <a.sacconi11 at imperial.ac.uk> wrote:
> 
>> Hi all GMSH users,
>> 
>> I would like to ask you a quick question about the usage of the API C++ classes to extract the connectivity of the mesh, once it has been created.
>> The setting is a planar mesh of triangles. I managed to create the GModel, passing lines, planar surface and physical entities. So far, so good.
>> The problem is, how can I extract how many triangles I have got and their vertices? It seems a silly question, but I am really confused about all the methods I found. What is the method to traverse only the elements and extract their vertices?
>> 
>> For example, what is the difference between GVertex and MVertex? Same questions for the other geometrical objects ...
>> In general, I need to pass the connectivity information to the C++ code I am writing for my thesis simulations.
>> 
> 
> Basically:
> 
> * a model is stored as a GModel
> * the GModel contains a bunch of geometrical entities derived from GEntity (GVertex, GEdge, GFace, GRegion)
> * each GEntity can store its mesh: i.e., both mesh elements, derived from MElement (MPoint, MLine, MTriangle, MTetrahedron, etc.), and mesh vertices (derived from MVertex)
> 
> The 2009 paper contains the basics... but we should indeed write a short introduction to the API. 
> 
> Christophe
> 
> 
>> Any help would be much appreciated!
>> Kind regards,
>> Andrea
>> __________________________________________________________
>> 
>> Andrea Sacconi
>> PhD student, Applied Mathematics
>> AMMP Section, Department of Mathematics, Imperial College London,
>> London SW7 2AZ, UK
>> a.sacconi11 at imperial.ac.uk
>> 
>> _______________________________________________
>> 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
> 
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140212/8e7ccda5/attachment.html>