> 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 _______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
