Skip to content

Replace BasicType from dune-geometry for PDELab 2.6

BasicType from dune-geometry has been deprecated in the 2.6 release of dune-geometry in core/dune-geometry!64 (merged) with the reasoning we probably don't need [it] anymore. I tried to verify that and sorta failed (@smuething I smell responsability muahaha):

We use BasicType in the following places in PDELab:

  • OPBLocalFiniteElementMap and VariableOPBLocalFiniteElementMap use it as a template parameter. It gets carried through a whole bunch of helper classes in dune/pdelab/finiteelement/l2orthonormal.hh
  • BrezziDouglasMariniLocalFiniteElementMap and RaviartThomasLocalFiniteElementMap require a BasicType as a template parameter in the case of the grid not providing a unique topologyId.
  • MimeticLocalFiniteElementMap uses it as an argument to its constructor and stores it.
  • boilerplate.hh feeds it into its grid factory concept to identify the desired meshtype

So, the most important thing to clarify is the user side of things. Taking OPBLocalFiniteElementMap as an example, a user currently writes:

auto bt = Dune::GeometryType::cube;
using OPBFEM = Dune::PDELab::OPBLocalFiniteElementMap<DF,RF,order,dim,bt,double>

So dune-geometry wants us to write something like this, as the topologyId of the GeometryType combines dimension and basic type:

auto gt = Dune::GeometryTypes::cube(dim);
using OPBFEM = Dune::PDELab::OPBLocalFiniteElementMap<DF,RF,order,gt.id(),double>

Whenever a helper class needs only one of the two information we can statically fiddle it out with an adaption of BasicTypeFromDimensionAndTopologyId from dune/pdelab/common/topologyutility.hh. However, I think that the above syntax is not desirable for a user interface. What do you think @all? Do you see other nice possibilities? Is reverting the original deprecation in dune-geometry even an option?