#1646 GridTraits: IndexType for IndexSets hardcoded to default value
Metadata
Property | Value |
---|---|
Reported by | Ansgar Burchardt (burchardt@igpm.rwth-aachen.de) |
Reported at | May 8, 2015 15:10 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Description
The GridTraits traits class contains the following typedef:
typedef IndexSet<const GridImp,LevelIndexSetImp> LevelIndexSet;
This hardcodes the 3rd and 4th template parameters for IndexSet
to its default values:
template< class GridImp, class IndexSetImp, class IndexTypeImp = unsigned int, class TypesImp = std::vector< GeometryType > > class IndexSet;
UG makes use of this: if defines IndexTypeImp
to UG::INT
. This works as long as unsigned int
and UG::INT
are compatible; this is not the case on the ppc64el architecture.
I see several options:
- Require
IndexTypeImp
to always beunsigned int
. Not sure what this means for UG. - Add additional template parameters for
IndexTypeImp
andTypesImp
to theGridTraits
class, with default parameters. This would extend the grid interface, but be backwards-compatible. Raises the question ifLeaf-
andLevelIndexSet
need to have the sameIndexType
or not. - Let grid implementations pass the full
IndexSet<...>
type instead of just the implementation. This is certainly not backwards compatible.
Ansgar