[Dune] How to map intersections?
    Dragan Vidovic 
    vitkecar at gmail.com
       
    Thu Mar 26 16:31:38 CET 2009
    
    
  
Hi all
I traverse elements using a LeafIterator and then I access their faces
using an IntersectionIterator. I associate fluxes with faces, and they
are stored in a std::vector, so I need to map these faces to an index.
I tried two things. First I tried to make a mapper that would select
faces trough a layout like this:
template<int dim>
struct P1Layout
{
  bool contains (Dune::GeometryType gt)
  {
	if (gt.dim()==dim-1) return true;
	return false;
  }
};
But the mapper does not work with an Intersection as an argument, and
I don't know how to turn this Intersection into an Entity that the
mapper can use.
Then I tried to use the P0Layout from the grid-howto and a different
map function:
int 	map (const typename G::Traits::template Codim< 0 >::Entity &e,
int i, unsigned int codim) const
But this function does not take a *LeafIterator as the first argument,
and I don't know how to make what it would take, and I don't know how
can it do the mapping from a typename, a local number, and a codim. I
don't understand this function.
So how can I map faces? I use a simplex Alugrid, so all codimensions
should be there.
Cheers,
Dragan
    
    
More information about the Dune
mailing list