Question #150226 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/150226
Status: Open => Answered Anders Logg proposed the following answer: On Wed, Mar 23, 2011 at 10:26:57PM -0000, Neilen Marais wrote: > New question #150226 on DOLFIN: > https://answers.launchpad.net/dolfin/+question/150226 > > Hi, > > Is there a way I can access mesh regions defined in a gmsh mesh? For > instance, if I define a .geo file with labled physical volumes: > > .... > Volume(25) = {24}; > Surface Loop(26) = {14, 10, 12, 17}; > Volume(27) = {26}; > Physical Volume ( 1000 ) = { 25 }; > Physical Volume ( 2000 ) = { 27 }; > > with the resulting .msh file: > > $Elements > 10 > 1 4 3 1000 25 0 1 9 6 10 > .... > 5 4 3 1000 25 0 10 6 2 8 > 6 4 3 2000 27 0 6 9 3 7 > .... > 10 4 3 2000 27 0 6 9 7 8 > $EndElements > > IOW, tets 1 through 5 have label 1000, and 6 through 10 has label 2000. > > After putting the .msh file through dolfin-convert the label data seems to be > lost. Is this simply a limitation of dolfin-convert not supporting the gmsh > feature, or does the dolfin mesh type not support labels of such a kind? > > Thanks > Neilen DOLFIN uses the MeshFunction class to store subdomain labels. If there are no MeshFunctions defined in the <data> section of the resulting XML file, then it's not supported by the dolfin-convert script. If you find it's missing and know how to fix it consider submitting a patch. -- Anders -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp