[Gmsh] How to associate line elements on boundaries with inner elements

Geordie McBain gdmcbain at freeshell.org
Thu Dec 1 01:33:29 CET 2011


2011/12/1 jeremy theler <jeremy at talador.com.ar>:
> Coincidentally, last week I ran into the very same issue Y Jiang did when
> dealing with Neumann boundary conditions for a finite element solver I am
> writing. I ended up doing what he proposes, i.e. trying to determine to which

I was a little puzzled by the first question in this thread, since in
the finite element method one does not need to know which domain
element a boundary element happens to be associated with in order to
carry out boundary integrals, or form their coefficients for imposing
boundary conditions during assembly.  Why do you need to know that
association?

> Moreover, in a non-totally-unrelated topic, I would also like to have a list
> of "neighbors" elements for each volumetric (2D in this case) element in order
> to implement a solver based on the finite-volumes method.

There is a program which does this: gmshToFoam.  Perhaps the FOAM
format finite volume mesh would suit your finite volume purposes?  I
believe it does contain the information about neighbours.

http://foam.sourceforge.net/docs/cpp/dir_0ea21710673acefee8cbcfc71446d291.html