[Gmsh] Physical group associated with elements
Xin Liu
lambert8809 at gmail.com
Tue Oct 16 03:35:57 CEST 2018
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 <cgeuzaine at uliege.be>
wrote:
>
>
> > On 15 Oct 2018, at 21:47, Xin Liu <lambert8809 at gmail.com> 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
> > gmsh at onelab.info
> > 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
======================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181015/1ea27d9d/attachment-0001.html>
More information about the gmsh
mailing list