Skip to content

WIP: Add StaticGeometryType

Carsten Gräser requested to merge feature/staticgeometrytype into master

This encodes all the information of a GeometryType as template parameters. Some remarks on the implementation:

  • This may be a solition for using GeometryTypes a template paremters.
  • All methods in Dune::GeometryTypes:: have analogouges in Dune::StaticGeometryTypes:: and additional template aliases for parametrized types. Hence you can e.g. use Simplex.
  • There is LocalHybridGeometryTypeIndex which works like LocalGeometryTypeIndex but supports GeometryType and StaticGeometryType.
  • Some topologyIds are different: If you want to overload for specific StaticGeometryTypes, you must be sure that the same geometry type leads to the same type. Hence topologyIds are normalize to have 0 in the first bit.
  • One may consider using uniqueTopologyId = (topologyId >> 1) as template parameter instead to get rid of the nasty non-uniqueness.

For now this is a non-intrusive proposal for discussion and thus marked WIP.

One could also merge Dune::StaticGeometryTypes into Dune::GeometryTypes:: and LocalHybridGeometryTypeIndex into LocalGeometryTypeIndex. This would change some dynamic types to static ones. However, this should not be a problem since each StaticGeometryType can be converted into its dynamic counterpart.

Merge request reports