← Back to team overview

dolfin team mailing list archive

Re: Boundary IDs

 

On Fri, Oct 22, 2004 at 05:41:43PM +0200, Johan Jansson wrote:
> Hi!
> 
> Erik Svensson, Christoffer Cromvik and I had a discussion about how to
> compute boundary IDs for edges and faces. We came to the conclusion
> that if every node has a list of the boundaries it belongs to, then
> that is sufficient to compute the boundary ID for a face.
> 
> Let's say we have a corner in a cube where each face of the cube has a
> different boundary ID.
> 
> D
>  \   3
>   \
>    A------C
>  2 |
>    |  1
>    |
>    B
> 
> A belongs to 1, 2, 3
> B belongs to 1, 2
> C belongs to 1, 3
> D belongs to 2, 3
> 
> The face defined by ACD then has the boundary IDs:
> (1, 2, 3), (1, 3), (2, 3)
> 
> The boundary ID which occurs in every node of the face is then the
> boundary ID of the face. So the boundary ID for face ACD is 3. For
> face ABC it's 1 and for face ABD it's 2.
> 
> What do you think, does this seem like a workable algorithm?

Seems like that would work, I like it.

>    A------C
>  2 |
>    |  1
>    |
>    B

> The XML format would change to this:
> 
> <dolfin xmlns:dolfin="http://www.phi.chalmers.se/dolfin/";>
>   <mesh>
>     <nodes size="8">
>       <node name="0" x="0.0" y="0.0" z="0.0">
>         <boundaryid name="1"/>
>         <boundaryid name="2"/>
>       </node>
>       <node name="1" x="1.0" y="0.0" z="0.0"/>
> ...
> 
> It's backwards compatible (a node without boundary IDs is defined just
> as before), so no changes are necessary for existing meshes.

Great, but maybe we should number boundaries starting at 0?

> What is left is the generation of the boundary IDs for faces and
> edges, but I think Erik is planning to do that.

Great. Put this into MeshInit, more specifically into the functions
initEdges() and initFaces().

/Anders



References