Skip to content

#210 Mapper classes expect redundant interface of layout class

Metadata

Property Value
Reported by Oliver Sander (oliver.sander@tu-dresden.de)
Reported at Nov 27, 2006 21:12
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Closed by Oliver Sander (oliver.sander@tu-dresden.de)
Closed at Nov 30, 2006 10:27
Closed in version 1.0
Resolution Implemented
Comment in dune-grid revision 3313 and dune-disc revision 415

Description

The various mapper classes in dune-grid/grid/common expect a layout class that tells which entities of a grid carry degrees of freedom. These layout classes are supposed to have a method operator()(int codim, GeometryType type). The first argument is superfluous, because the layout class gets the grid dimension as a template parameter and GeometryType objects know their dimension. The redundancy is a leftover from the introduction of the GeometryType, and should be removed, because it is confusing.

The problem is that I do not see a way to remove the first argument without inducing compile failures in application code. These failures will not be serious, though. In a few days I will change the mappers such that they will expect their layout classes to have operator()(GeometryType type). Any Dune application that defines its own layout classes will then fail to compile. To fix these failures please remove the first argument of operator() of each layout class you define, and replace all occurrences of codim with dim-type.dim().

Of course if someone comes up with a smoother way to make this transition I will be more than happy to comply.