Roy, I do update the n_subdomains as part of my code. In fact after all elems has been updated with the right subdomain ids, I have a call that looks like
unsigned int& nsubdms = mesh.set_n_subdomains() ; nsubdms = sbd_ids.size() ; in GmshIO. Is this what you were looking for ? I optionally can add the information about subdomain_id and other attributes in .msh file to a mesh_data object. I have not used this feature in a while but never went back and removed this support either. Do you want this support in the patch too or do you still want to keep Gmsh to not use mesh_data as it originally was implemented. Do let me know about this before I create a patch tomorrow. Vijay On Tue, Oct 27, 2009 at 6:26 PM, Roy Stogner <royst...@ices.utexas.edu> wrote: > > On Wed, 28 Oct 2009, Arvind Ajoy wrote: > >> I am trying to read in a simple mesh created using Gmsh, which has >> two Physical regions. I use the example programme ex1.cc to read >> the .msh file, and write it out as another .msh file, i.e ./ex1 -d 2 >> in.msh out.msh. >> >> I find that the output of ex1.cc mentions n_subdomains()=1, though >> there are two physical regions. > > Interesting... > > MeshBase::n_subdomains() has been around since 2005, when Ben added > it (presumably to Mesh, back then?). > MeshBase::set_n_subdomains() appears to be an easy accessor that Derek > added earlier this year... but other than a little overloading in the > BoundaryInfo::sync() method, I can't find anywhere that subdomain > counts are actually getting *set* rather than just copied around! > > I suppose a typical use case is for the user code to set subdomain > ids, but we do support them in Exodus, GMSH, Nemesis, and XDR I/O... > yet none of that code seems to update the total mesh id count. > > Ben, Derek, anyone else know what I'm missing? It seems as if > updating MeshBase::_n_sbd ought to be a standard part of > prepare_for_use(), but isn't... > --- > Roy > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Libmesh-devel mailing list > Libmesh-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libmesh-devel > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel