← Back to team overview

dolfin team mailing list archive

Re: new mesh

 

I have merged the computation of the mapping of vertices from the
boundary (patch from Ola Skavhaug) with the computation of a mapping
from the cells of a boundary mesh to the facets of the corresponding
mesh.

I have removed the previous mapping icell. The cell mapping (cell_map)
can be used instead:

    boundary cell --> cell_map --> mesh facet --> interior cell

This is mainly untested, so feel free to jump in and see if it does what
it should. I'll be offline tomorrow morning but will check back
tomorrow afternoon again.

The code below does not work and it shouldn't. The number of
connections to entities of dimension 2 does not exist for the boundary
of a triangular mesh. The boundary is a mesh itself and in this case
it exists only of vertices and edges (dimension 0 and 1). No entity of
dimension 2 exists.

Then the question is what should happen when one requests an entity
that does not exist. There are a couple of options. What happens
currently is that dolfin_assert() kicks in. (Remember to configure
with --enable-debug to see this.) We could also just return 0, but
that might not be a good idea since then the code will run and may
produce incorrect results, which is more difficult to spot than an
assert.

/Anders

On Mon, Oct 16, 2006 at 07:54:07PM +0200, Garth N. Wells wrote:
> I'm struggling a bit with the new mesh structure. For a triangular mesh,
> I expected that
> 
>   BoundaryMesh boundary(mesh);
>   for (CellIterator facet(boundary); !facet.end(); ++facet)
>   {
>       cout << (*facet).numConnections(0) << endl;
>       cout << (*facet).numConnections(2) << endl;
>   }
> 
> would print 2 and 2 (or 1), but it prints 2 and 8. Also,
> 
>   cout << (*facet).numConnections(1) << endl;
> 
> leads to a segmentation fault. Should
> 
>   foo.numConnections(N);
> 
> return the number of mesh entities of topological dimension N which are
> attached to foo?
> 
> Garth
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


References