On 10/19/2011 07:41 AM, Matteo Semplice wrote:
> Using gmsh was indeed my first attempt, but something does not work here.
> Consider the following geometry saved in squarewithhole.geo:
> ---------
> Point(1) = {0, 0, 0};
> Point(2) = {0, 1, 0};
> Point(3) = {1, 1, 0};
> Point(4) = {1, 0, 0};
> Point(5) = {.5, .2, 0};
> Point(6) = {.2, .5, 0};
> Point(7) = {.7, .5, 0};
> Line(1) = {1, 4};
> Line(2) = {4, 3};
> Line(3) = {3, 2};
> Line(4) = {2, 1};
> Line(5) = {5, 7};
> Line(6) = {7, 6};
> Line(7) = {6, 5};
> Line Loop(8) = {2, 3, 4, 1};
> Line Loop(9) = {6, 7, 5};
> Plane Surface(10) = {8, 9};
> Physical Line("Dirichlet") = {2,3,4,1};
> Physical Line("Neumann") = {6, 7, 5};
> ----------
> Either meshing with an interactive session of gmsh or with
> $gmsh -2 squarewithole.geo
> gives me a suarewithole.msh file, but then
>
> Mesh mesh;
> std::cout << "read msh mesh..." <<std::endl;
> GmshIO(mesh).read("squarewithole.msh");
> std::cout << "done." <<std::endl;
> mesh.print_info();
> mesh.boundary_info->print_summary();
>
> gives the following output
>
> ==============
> read msh mesh...
> done.
> Mesh Information:
> mesh_dimension()=2
> spatial_dimension()=3
> n_nodes()=35
> n_local_nodes()=0
> n_elem()=0
> n_local_elem()=0
> n_active_elem()=0
> n_subdomains()=0
> n_processors()=1
> processor_id()=0
>
> Nodal Boundary conditions:
> --------------------------
> (ID, number of nodes)
> (1, 28)
> (2, 7)
> ==============
>
> So I get the correct number of boundary conditions, but the mesh has
> no elements...
>
> What am I doing wrong?
I believe once you have at least one physical in your .geo, then _only_
the data associated with a physical gets written out to file. So, I
think you need to add physicals for the "Surface" as well. (Note: this
is related to gmsh, not to libMesh.)
Does that work?
David
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users