[Dune] [Fwd: Re: How to map intersections?]

Carsten Graeser graeser at math.fu-berlin.de
Fri Mar 27 17:04:20 CET 2009


(Forgot to cc the list.)

-------- Original-Nachricht --------
Betreff: Re: [Dune] How to map intersections?
Datum: Fri, 27 Mar 2009 16:31:37 +0100
Von: Carsten Graeser <graeser at math.fu-berlin.de>
An: Dragan Vidovic <vitkecar at gmail.com>
Referenzen: <c0423b6a0903260831h4084d75ds6d55d2a9fdacf733 at mail.gmail.com>	
<49CBA5C0.6090006 at mi.fu-berlin.de>	 <c0423b6a0903261141r18eaa6fep34b90687d0f3d1aa at mail.gmail.com>	
<49CBF4E0.6090704 at math.fu-berlin.de> <c0423b6a0903270817k4323e647yc48e8df1aaa74cb2 at mail.gmail.com>

If you use this within a template the correct c++ syntax is

mapper.template map<1>(...)

Dragan Vidovic schrieb:
> Thanks Carsten. I use Alugrid, so I tried the template version. But it
> still does not compile. The error message is
> 
> multiplicativeOperator.hh:142: error: no matching function for call to
> ‘Dune::LeafMultipleCodimMultipleGeomTypeMapper<Dune::ALUSimplexGrid<3,
> 3>, P0Layout>::map(Dune::Entity<0, 3, const Dune::ALU3dGrid<3, 3,
> tetra>, Dune::ALU3dGridEntity>&, int)’
> 
> But I don't understand where should I specify this template argument -
> mapper.map<1> does not work. I searched all Dune code and I found only
> one example of this method - and even that one was commented out, in
> mcmgmappertest.cc. Here it is:
> 
>             int index = mapper.map(*eIt, iIt.numberInSelf());
> 
> iIt is an IntersectionIterator. So where should this get the codim from?
> 
> Sorry guys, obviously I'm trying to learn Dune and c++ at the same time.
> 
> Cheers,
> 
> Dragan
> 
> 
> On Thu, Mar 26, 2009 at 10:34 PM, Carsten Graeser
> <graeser at math.fu-berlin.de> wrote:
>> Hi Dragan
>>
>> The method proposed by Oliver taking also the codim as argument is brand new (<2weeks)
>> in the svn trunk. It's currently implemented for OneDGrid, UGGrid and AlbertaGrid
>> and will also be implemented for other grids. If you use an older version of dune
>> or need a grid that does not implement it currently you can use the 'old' style
>> method taking two arguments and the codim as template argument.
>>
>> Carsten
>>
>> Dragan Vidovic schrieb:
>>
>>> 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.


-- 
----------------------------------------------------------------------
Carsten Gräser           | phone: +49-30 / 838-75349
Freie Universität Berlin | fax  : +49-30 / 838-54977
Institut für Mathematik  | email: graeser at math.fu-berlin.de
Arnimallee 6             |
14195 Berlin, Germany    | URL  : http://page.mi.fu-berlin.de/graeser
----------------------------------------------------------------------


-- 
----------------------------------------------------------------------
Carsten Gräser           | phone: +49-30 / 838-75349
Freie Universität Berlin | fax  : +49-30 / 838-54977
Institut für Mathematik  | email: graeser at math.fu-berlin.de
Arnimallee 6             |
14195 Berlin, Germany    | URL  : http://page.mi.fu-berlin.de/graeser
----------------------------------------------------------------------




More information about the Dune mailing list