[Dune] MCMGMapper

Oliver Sander sander at mi.fu-berlin.de
Tue Mar 17 15:24:33 CET 2009


I don't really see why this patch shouldn't be applied.
Peter: Why is the layout object static?  In most cases it doesn't contain
data, so having one copy per mapper doesn't waste any memory.

--
Oliver

Carsten Graeser schrieb:
> Dear Dune,
> currently the MCMGMapper gets the Layout class template as template parameter
> and uses a static instance of this class to determine if a GeometryType should be
> counted by the mapper. This is done by using a nonstatic method of this instance
> Is there any (e.g. performance-) reason why the Layout instance is static ?
>
> Otherwise it would be nice to use a nonstatic member instead. Then one could
> add contructors to the mapper taking a Layout instance which is copied. The
> current constructor would just use the default constructor of the Layout class.
>
> While this would not brake existing code (except for the ugly case it relies on the
> use of single static member) it provides the possibility to use mappers for
> different codims having the same type. Thus one could use an array containing
> a mapper for each codim.
>
> Please find the implementation of this proposal attached. If there are no objections
> it would be nice if someone could commit it.
>
> Best regards
> Carsten
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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