#743 Add a way to determine whether a grid is hybrid
Metadata
Property | Value |
---|---|
Reported by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Reported at | Feb 19, 2010 13:22 |
Type | Feature Request |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Robert K (robertk@posteo.org) |
Last edited at | Dec 15, 2010 16:13 |
Closed by | Robert K (robertk@posteo.org) |
Closed at | Dec 15, 2010 16:13 |
Closed in version | 2.1 |
Resolution | Implemented |
Comment | Implemented in version 7249. |
Description
For meta-grids (like the GeometryGrid), it would be nice to know whether the underlying host grid is hybrid or not. In the non-hybrid case, the (constant) codim 0 geometry type would also be interesting (compile time constant).
Knowing the 2 things, GeometryGrid< AlbertaGrid, CoordFunction > could use the non-hybrid implementation of the generic geometries, saving some performace in explicit codes (2% in my last test, which is long ago).
One suggestion could be to add a GeometryInfo structure looking as follows:
struct GeometryInfo { static const int dimension = dim; static const int dimensionworld = dimworld; static const bool hybrid = false; static const GeometryType::BasicType basicType = GeometryType::simplex; };
Whether this structure can be obtained from somewhere within the grid or is a specialized structure outside the grid would, of course, need to be discussed. If this structure is not contained in the grid, we could provide a default implementation:
struct GeometryInfo { static const int dimension = dim; static const int dimensionworld = dimworld; static const bool hybrid = true; };
Apart from meta-grids, there might even be other code pieces, where this information is desirable (e.g., the MGMC mapper could does not need to look up the gemetry type for non-hybrid grids).