On 01/15/2013 05:50 AM, John Peterson wrote: > On Mon, Jan 14, 2013 at 2:08 PM, Chad Lieberman > <[email protected]> wrote: >> To those it may concern: >> >> I have developed a 3-D mesh in Gmsh, and I am looking for an example in >> libMesh that reads in a Gmsh mesh (.msh) file and identifies boundaries >> etc. As a short term goal, I am attempting to modify introduction_ex4.C in >> the libMesh distribution to solve the Poisson equation in 3-D on my mesh >> instead of on a cube. Any pointers and especially example code are much >> appreciated! > It should be possible to read the mesh as: > > Mesh mesh(3); > mesh.read("foo.msh"); > > The boundary information will then be stored in the mesh.boundary_info object. > > This object stores logical triples (elem_id, side_id, boundary_id). > > You can see an example of its use in systems_of_equations_ex2-6.
Note also that you have to assign "physical" IDs in gmsh to the boundary surfaces. These get read in by libMesh as boundary IDs. David ------------------------------------------------------------------------------ Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
