[Hedge] Trying to Read From Gmsh

Daniel Gempesaw gempesaw at gmail.com
Mon Feb 28 17:37:46 PST 2011


Hi,

Thanks so far for the help, Scott/Andreas. From the help you've provided, I
successfully modified my .geo file and I can use both generate_gmsh or
read_gmsh to get the geometry into hedge successfully. My issue now is how
to assign the boundary tags (inflow, outflow, noslip) to the appropriate
faces. I've been reading the archives and I saw a discussion in 2009
initiated by David Powell about a  similar issue (
http://lists.tiker.net/pipermail/hedge/2009-December/000176.html).

Is this because the gmsh reader makes no association between the line
elements and the corresponding boundary faces?Do I need to write a
boundary tagger function to look at each boundary, find out if it
coincides with a line element which has a tag, and if it does, add an
appropriate tag to the face?

Is it still currently the case that I need to have a separate
boundary_tagger function that assigns tags to the pertinent faces? If so, I
can probably figure out how to iterate through mesh.elements, but I'm not
sure how to ascertain if the face is a boundary and how to assign a tag to
the face if necessary.

My .geo file has the tags as Physical Surfaces, and when I manually mesh
using gmsh, the resulting .msh file also has a $PhysicalSurfaces section
with the proper names, so I think I'm doing things right from the gmsh side.

Also, my simulation is in 2D. Is it appropriate for me to be using
PhysicalSurfaces as opposed to Physical Lines? In David Powell's example he
was using Physical Lines for some of his boundaries, but if I do that I get
the same LU decomposition error as previously mentioned.

Again, thanks for the help.

Daniel Gempesaw


On Thu, Feb 24, 2011 at 10:45 AM, Andreas Kloeckner <lists at informa.tiker.net
> wrote:

> Hi Daniel,
>
> On Wed, 23 Feb 2011 19:18:30 -0500, Daniel Gempesaw <gempesaw at gmail.com>
> wrote:
> > So, I tried making the mesh manually using gmsh and reading that in using
> > read_gmsh, but I ran into a second error about how an LU decomposition
> > failed, which I fear may reflect a lack of memory? Any suggestions would
> be
> > welcome.
> >
> > >>> mesh = read_gmsh(filename='channel.msh',force_dimension=None,
> > > periodicity=None,allow_internal_boundaries=True)
> > > Traceback (most recent call last):
> > >   File "<stdin>", line 1, in <module>
> > >   File "/home/daniel/karen/src/hedge/hedge/mesh/reader/gmsh.py", line
> 297,
> > > in read_gmsh
> > >     tag_mapper=tag_mapper)
> > >   File "/home/daniel/karen/src/hedge/hedge/mesh/reader/gmsh.py", line
> 531,
> > > in parse_gmsh
> > >     hedge_el = el_class(el_nr, vertex_indices, hedge_vertices)
> > >   File "/home/daniel/karen/src/hedge/hedge/mesh/element.py", line 59,
> in
> > > __init__
> > >     self.inverse_map = map.inverted()
> > > RuntimeError: lu decomposition failed
>
> "lu decomposition failed" in this context means that gmsh generated an
> element that has no volume, and thus its affine map has no inverse, thus
> trying to invert the mapping matrix fails. Again, points to meshing
> issues. Maybe you're double-specifying a boundary or some such?
>
> Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/hedge/attachments/20110228/5bad6715/attachment.html>


More information about the Hedge mailing list