[Dune] MCMGMapper

Carsten Graeser graeser at math.fu-berlin.de
Tue Mar 17 16:08:10 CET 2009


Ups,
I forgot a 'mutable'. Use the attached version instead of the originally posted.

In the long term the layout member should be const. But this would require its
contains method to be const too (why isn't const currently?) and thus might break
existing code. 'Mutable' is a dirty hack to circumvent this small design/docu flaw.

Carsten

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


-- 
----------------------------------------------------------------------
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
----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcmgmapper.hh
Type: text/x-c++hdr
Size: 8957 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20090317/3822704a/attachment.hh>


More information about the Dune mailing list