[Gmsh] How to associate line elements on boundaries with inner elements
jeremy theler
jeremy at talador.com.ar
Thu Dec 1 02:36:28 CET 2011
On Wednesday 30 November 2011 21:33:29 Geordie McBain wrote:
> 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?
Not when dealing with essential (Dirichlet) boundary conditions. But for
natural boundary conditions, you have to integrate the form functions over the
surface where the natural conditions are given. For example, in a 2D problem,
on the one hand you need the physical entity "line" to know what kind of
boundary condition you have, and on the other you need to compute the form
functions of the 2D element that contains the boundary.
Can you see the point now? I can give you some examples via private mail if
you want.
> > 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.h
> tml
I was not aware of this tool. I will take a look at it. Thank you for the
hint!
jeremy