Add freestanding function referenceElement(geometry)
As suggested in #65 (closed), this merge request adds a freestanding function referenceElement(geometry)
that returns a reference element for a grid geometry by value. This will work for all grids with geometries based on the standard reference elements. For grids that want to return something else, the behavior can be changed by providing an overload for referenceElement(const Geometry&, const GeometryImplementation&)
in an appropriate namespace.
Moreover, it is also possible to get the type of the reference element for Geometry
using Dune::ReferenceElement<Geometry>
.
Both the change to value semantics and Dune::ReferenceElement<Geometry>
rely on dune-geometry!52 (merged). I've also tried to adapt all of dune-grid to the new interfaces (in particular, the value semantics and the deprecation of Dune::ReferenceElement<ctype,dim>
) - but no guarantees.
I had to build in a pretty ugly hack to make the thing work on Debian 8, which is contained in a single commit and should be reverted once we drop support for GCC 4.9.
This merge request closes #65 (closed).