[Dune] How to map intersections?
Dragan Vidovic
vitkecar at gmail.com
Thu Mar 26 19:41:19 CET 2009
Hi Oliver
There is no map method with three arguments in my mcmgmapper.hh. I
took it from svn some two weeks ago. There are only two map methods
there - with one and with two arguments, unlike what's found in
http://www.dune-project.org/doc/doxygen/dune-grid-html/mcmgmapper_8hh-source.html.
I've done what you suggested and I've got the following compiler message:
multiplicativeOperator.hh:142: error: no matching function for call to
‘Dune::LeafMultipleCodimMultipleGeomTypeMapper<Dune::ALUSimplexGrid<3,
3>, P1Layout>::map(Dune::Entity<0, 3, const Dune::ALU3dGrid<3, 3,
tetra>, Dune::ALU3dGridEntity>&, int&, int)’
If I use only one argument then it compiles, but if I use three
arguments then it doesn't.
Cheers,
Dragan
On Thu, Mar 26, 2009 at 4:56 PM, Oliver Sander <sander at mi.fu-berlin.de> wrote:
> You need a mapper and what you called a P1Layout. The mapper
> has a method that takes an element, a codimension, and a subentity
> number. The element is what your LeafIterator points to, the codimension
> is 1, and the subentity number is given by the method numberInSelf()
> of the IntersectionIterator.
>
> --
> Oliver
>
>
> Dragan Vidovic schrieb:
>>
>> 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
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>
>
>
> --
> ************************************************************************
> * Oliver Sander ** email: sander at mi.fu-berlin.de *
> * Freie Universität Berlin ** phone: + 49 (30) 838 75348 *
> * Institut für Mathematik ** URL : page.mi.fu-berlin.de/~sander *
> * Arnimallee 6 ** -------------------------------------*
> * 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
> ************************************************************************
>
>
More information about the Dune
mailing list