#1194 Allow Different Return Types for Entity::geometry and Intersection::geometry
|Reported by||Martin Nolte (email@example.com)|
|Reported at||Oct 15, 2012 09:07|
|Operating System||Unspecified / All|
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.
- (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
IntersectionGeometryon 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
What's the opinion of the others?