[firedrake] problems with importing a mesh
G. D. McBain
gdmcbain at protonmail.com
Fri Nov 3 00:07:51 GMT 2017
> 2) For splines, I have also removed the point (updated code below) and when I look at it using gmsh I see that some points aren't actually on the boundary. This does seem odd but I am not sure how to fix it. Should I use a different kind of spline?
The problem may be this: the Gmsh concept of Physical versus Elementary entities.
http://gmsh.info/doc/texinfo/gmsh.html#Elementary-vs-physical-entities
Your Gmsh file has only Elementary entities (Point, Line/Spline, Line Loop, Plane Surface). The trick is to mark the domain (for this two-dimensional problem) as a Physical Surface and each part of the boundary as a Physical Line. In three dimensions, those would be Physical Volume and Physical Surface, respectively.
When a Gmsh file has no Physical entities, Gmsh puts everything into the mesh, including construction points (centres of arcs, control-points of splines), which often end up as disconnected, but if there is a least one Physical entity, only those finite elements belonging to Physical entities are included in the output .msh.
A quirk of Firedrake, maybe inherited from PETSc which I think it uses to read Gmsh meshes, is that every part of the boundary has to be declared as part of a Physical Line/Surface, even if it's only going to get homogeneous natural boundary conditions in the finite element problem.
Hope this helps; I can supply a little example, if the above is unclear.
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the firedrake
mailing list