#1194 Allow Different Return Types for Entity::geometry and Intersection::geometry
Metadata
Property | Value |
---|---|
Reported by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Reported at | Oct 15, 2012 09:07 |
Type | Feature Request |
Version | 2.2 |
Operating System | Unspecified / All |
Description
Currently, the interface requires Entity::geometry and Intersection::geometry
to return objects of the same type (GridFamily::Traits::Codim< 1 >::Geometry
).
Unfortunately, intersection geometries can be far more complicated than face geometries.
Examples:
- (a) A hexahedral grid can only have quadrilateral faces, but intersections might be triangular (=> cannot optimize of the geometry type anymore)
- (b) A meta grid might want glue together grids of the same type. All entity geometries can be inherited from the host grid; the intersection geometries, however, need to exchanged.
The natural solution to me seems to split up the types. This could be resolved in two ways:
- (1) introduce a type
Codim<cd>::EntityGeometry
and anIntersectionGeometry
on the grid view. - (2) let the entity / intersection decide upon the type for
Geometry
(i.e., don't export it in the traits class).
Version (1) is in line with exporting all types in a central place, while version (2) is more modular. In my opinion (2) is more DUNE-like as we promote modularity. In both cases, I would suggest to deprecate the type Codim<cd>::Geometry
.
What's the opinion of the others?