[Dune] face indices in UGGrid

Sven Marnach sven at pantoffel-wg.de
Mon Oct 29 15:46:53 CET 2007


Hi,

I'd like to implement a discretization with unknowns on the cell and
face centers of a non-conforming UG grid.  To get a consecutive
numbering of the unknowns, I use a LeafMultipleCodimMultipleGeomTypeMapper.
To get the index of an unknown, I have to pass the corresponding
Entity as an argument to the map() member function of the mapper.

1. In this grid,

   +-----+--+--+
   |     |  |  |
   +     +--+--+
   |     |  |  |
   +-----+--+--+

   does the right face of the left cell belong to the leaf grid?  If
   it does, how do I get an efficient mapper which doesn't include
   this face?

2. It seems quite inefficient to me that I really have to construct an
   entity just to get the index, but the map method of the Mapper
   interface requires this.

3. IN UGGrid, the entity<1>(int) method of codim 0 entities doesn't
   seem to be implemented.  The following code snippet

     typedef Dune::UGGrid<dim> GridType;
     UnitCube<GridType,1> uc;
     GridType& grid = uc.grid();
     GridType::Codim<0>::LeafIterator it = grid.leafbegin<0>();
     GridType::Codim<1>::EntityPointer qqq = it->entity<1>(0);

   works with Alberta, but causes a linker error with UGGrid<2> and a
   compiler error with UGGrid<3>.

   Oliver, could you give me a hint how to implement it?  Is it
   possible to do this without knowing anything about the UG
   internals?  Are the EntityPointers and Entities of codim 1
   implemented at all?

   Or does anybody know a way to get a consecutive numbering of the
   unknowns without using this method?

Greetings from Stuttgart,
    Sven




More information about the Dune mailing list