-
Quadrature point now allows C++ structured bindings so that numerical integrations are less verbose:
for(auto [position, weight] : Dune::QuadratureRules</*...*/>::rule(/*...*/)) result += f(position) * weight;
-
Dune::Geo::ReferenceElement
methods that have returned references, return by value. This affectstype()
,position()
, andintegrationOuterNormal()
. -
Add a meta-geometry type
MappedGeometry
that represents the chaining of another geometry and a callable. -
AffineGeometry
andAxisAlignedGeometry
are now default constructible. A default construction results in an "empty"/invalid geometry that can be assigned a valid geometry. -
Add a geometry
LocalFiniteElementGeometry
parametrized by local finite-element basis functions.
-
Dune::Transitional::ReferenceElement
is deprecated and will be removed after Dune 2.10. UseDune::Geo::ReferenceElement
directly. -
Remove header
deprecated_topology.hh
that was introduced for transition. -
Remove deprecated functions
factorial()
andbinomial()
. Use the functions from dune-common'smath.hh
.
-
The
Geometry
interface was extended by methodsjacobian(local)
andjacobianInverse(local)
and corresponding typedefsJacobian
andJacobianInverse
. This is implemented by all geometry implementations provided by dune-geometry. But external implementations need to be adjusted to pass the interface check provided bycheckgeometry.hh
. -
The
Geometry::integrationElement
now needs to return the typeVolume
instead ofctype
. Note that this may be different fromctype
if the geometry supports typed dimensions. In such case,ctype
is a length, and not appropriate for a volume quantity.
-
Python bindings have been moved from the
dune-python
module which is now obsolete. To activate Python bindings the CMake flagDUNE_ENABLE_PYTHONBINDINGS
needs to be turned on (default is off). Furthermore, flags for either shared library or position independent code needs to be used. -
The class
AxisAlignedCubeGeometry
has always had a constructor taking two argumentsFieldVector<ctype,coorddim> lower
andFieldVector<ctype,coorddim> upper
. This constructor was always to be used in the casedim==coorddim
only, but this was never enforced. Starting with version 2.8, compilation fails with an error message if this constructor is used withdim!=coorddim
. -
Two new sets of quadrature rules are provided: the left and right Gauss-Radau quadrature rules. These are optimal rules that include only one endpoint of the integration interval (either left or right) and integrate polynomials of order 2n - 2 exactly.
-
GeometryType has four new methods:
isPrismatic()
,isPrismatic(int step)
andisConical()
,isConical(int step)
. The versions with an argument return true if the corresponding construction was used in step 0 <=step
<=dim-1. The other two assume a default argument ofdim-1
(the latest construction step). -
GeometryTypes has two new methods:
prismaticExtension(GeometryType gt)
andconicalExtension(GeometryType gt)
. They return an extended GeometryType based ongt
via the corresponding construction. For example:GeometryType gt = GeometryTypes::line; auto square = GeometryTypes::prismaticExtension(gt); auto triangle = GeometryTypes::conicalExtension(gt);
-
Remove code needed to use reference elements by reference.
-
Remove
GeometryType
's deprecated member functionsGeometryType::make...()
. -
Remove deprecated constructor
GeometryType(unsigned dim)
. -
Remove deprecated
CompositeQuadratureRule(QuadratureRule, int)
. UseCompositeQuadratureRule(QuadratureRule, Dune::refinement{Intervals|Levels}(int))
instead. -
Removed all structs from
Impl
dealing with the recursive topology construction:TopologyFactory
,TopologySingletonFactory
,Point
,Prism
,Pyramid
,IsSimplex
,IsCube
,SimplexTopology
,CubeTopology
,PyramidTopology
,PrismTopology
,IfTopology
. Deprecated the free functionImpl::isTopology
. Use the geometries provided byGeometryType
andGeometryTypes
instead. To simplify the transition you can include the header "dune/geometry/deprecated_topology.hh".
- The reference elements have a new method
subEntities
. The result ofreferenceELement.subEntities(i,codim, c)
is an iterable range containing the indices of all codim-c
subentities of the subentity(i,codim)
, e.g., the vertices of an edge. The range also provides the methodssize()
andcontains()
. - The methods
GeometryType(int)
andGeometryType(unsigned int)
have been deprecated and will be removed after the release of dune-geometry 2.7. Instead, please now useGeometryTypes::cube(dim)
to construct one- or two-dimensionalGeometryType
objects. - Geometry implementations now export a type
Volume
that is used for the return value of thevolume
methods. So does the genericReferenceElement
implementation. - More efficient quadrature rules for simplices are available that
need less quadrature points to achieve the same order. For now these
have to be explicitly requested:
See !127.
auto&& rule = Dune::QuadratureRules<...>::rule(..., Dune::QuadratureType::GaussJacobi_n_0);
-
The enum
GeometryType::BasicType
is deprecated, and will be removed after Dune 2.6. -
VirtualRefinement
andRefinement
now support arbitrary refinements, not just powers of two. Wherever you where passing a parameterint levels
(now deprecated), you should now pass a parameterRefinementIntervals intervals
. There are convenience functionsrefinementIntervals(int intervals)
andrefinementLevels(int levels)
to construct parameters of typeRefinementIntervals
.See core/dune-geometry!51
-
The class
GeometryType
has been cleaned up in major way:See core/dune-geometry!64 and core/dune-geometry!55
-
The class and most of its methods are now
constexpr
. -
There are new singletons and factory functions in the namespace
Dune::GeometryTypes
. These are now the official way to obtain aGeometryType
. -
The constructor taking a
GeometryType::BasicType
and a dimension has been deprecated and will be removed after the release of DUNE 2.6. -
The assorted member functions
GeometryType::make...()
have been deprecated and will be removed after the release of DUNE 2.6.
-
-
The reference element interface has had a substantial overhaul that can break backwards compatibility in some corner cases.
See core/dune-geometry!52
-
ReferenceElement
has value semantics now: You should store instances by value and can freely copy them around. Doing so is not more expensive than storing a const reference. -
As a consequence of value semantics,
ReferenceElement
is default constructible now. A default constructedReferenceElement
may only be assigned anotherReferenceElement
; all other operations cause undefined behavior. Moreover, instances are now comparable and hashable to allow storing them in maps. -
We have added code that tries to warn you if you are still storing a
ReferenceElement
by const reference; please update all those occurrences. -
The meaning of
Dune::ReferenceElement
has changed. It is not a type anymore, but an alias template that looks up the correct implementation for the given template arguments. For now, there is only a single implementation, but we expect people to come up with additional implementations in the future. For this reason, the syntaxDune::ReferenceElement<ctype,dim>
is deprecated and will cause compilation failures in the future. If you still need access to that type, usetypename Dune::ReferenceElements<ctype,dim>::ReferenceElement
instead. -
You can now directly obtain a reference element for a given geometry using the free function
referenceElement(geometry)
. This function should be called without any namespace qualifiers to enable ADL and you should normally capture the return value of the function usingauto
, but if you need to explicitly access the type, this is also available asDune::ReferenceElement<Geometry>
.In short: If you can, use the following idiom to obtain a reference element for a geometry:
auto ref_el = referenceElement(geometry);
The change to the meaning of
Dune::ReferenceElement
can break compilation if you have function overloads that partially specialize on it, e.g.template<typename ctype, int dim> void f(const Dune::ReferenceElement<ctype,dim> ref_el) {}
Normally, you can just simplify this to the following code that also shows how to extract the missing template parameters:
template<typename RefEl> void f(const RefEl ref_el) { using ctype = typename RefEl::CoordinateField; constexpr auto dim = RefEl::dimension; }
-