Hi Prof. Geuzaine,

Thanks a lot for your quick reply. Yes, getElements() works well for me.

Thanks
Xin

On Mon, Oct 15, 2018 at 4:42 PM Christophe Geuzaine <[email protected]>
wrote:

>
>
> > On 15 Oct 2018, at 21:47, Xin Liu <[email protected]> wrote:
> >
> > Dear Developers,
> >
> > I am trying to use the new Gmsh API with SDK to build applications, and
> I found it is very handy. Thank you for providing such a good tool. Now, I
> am working on mechanics of composite materials, and very often, I need to
> get information about the physical group of each element as different
> materials are assigned to different regions. I notice the V4 mesh format
> arranges the elements in order of the physical groups, but how can I get
> such information using API? I also notice the current API provides
> "getNodesForPhysicalGroup", so I would expect some functions like
> "getElementsForPhysicalGroup"
>
>
> Use getEntitiesForPhysicalGroup(), then getElements()
>
>
> > or better "getPhysicalGroupForElements" which takes input elementID and
> returns PhysicalGroupID.
>
> That would be quite inefficient, as querying elements individually is slow.
>
> Christophe
>
> >
> > Thanks
> >
> > --
> > ======================================
> > Xin Liu
> > PhD Candidate, Graduate Research Assistant
> > Multiscale Structural Mechanics Group
> > School of Aeronautics & Astronautics
> > Purdue University
> > ======================================
> > _______________________________________________
> > gmsh mailing list
> > [email protected]
> > http://onelab.info/mailman/listinfo/gmsh
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>
>

-- 
======================================
Xin Liu
PhD Candidate, Graduate Research Assistant
Multiscale Structural Mechanics Group
https://cdmhub.org/members/1776
School of Aeronautics & Astronautics
Purdue University
Neil Armstrong Hall of Engineering
701 W. Stadium Ave.
West Lafayette, Indiana 47907-2045
======================================
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to