dune-geometry
2.2.0
|
To obtain the new reference element include the file and use the new reference element class
dune/geometry/genericreferenceelements.hh Dune::GenericReferenceElements Dune::GenericReferenceElement
instead of
dune/grid/common/referenceelements.hh Dune::ReferenceElements Dune::ReferenceElement
The interface of the GenericReferenceElements and of the GenericReferenceElement is the same as before.
In order to facilitate the transition we introduced new method names for methods that rely on a numbering. Methods in the second column of the table below will give you the old numbering, and methods in the third column will give you the new one. In many cases the new names are also more meaningful. The old methods still work, but they are deprecated and will be removed for Dune 1.4.
class | deprecated method with old numbering | method with new numbering |
Entity<0> | entity | subEntity |
Intersection | numberInSelf | indexInInside |
numberInNeighbor | indexInOutside | |
IndexSet | subIndex<c>(...) | subIndex(...,c) |
IdSet | subId<c>(...) | subId(...,c) |
Mapper | map<c>(...) | map(...,c) |
contains<c>(...) | contains(...,c,result) | |
Geometry | operator[] (returns reference) | corner (returns value) |
If you don't want to rely on deprecation warnings and make sure that your code really doesn't use any old numbering stuff, then you can configure Dune with --disable-old-numbering
. If this is set, all methods providing old numbers are removed from the header files.
To map a new subentity number to an old number or vice versa use the methods provided by the static methods of the class GenericGeometry::MapNumberingProvider. To obtain for a given reference element of a fixed dimension and dune geometry type the new number for a new subentity of given codimension given the old one (or vice versa) use
// get class with static methods // using the dimension of the reference elements typedef GenericGeometry::MapNumberingProvider< dimension > Numbering; // obtain the number of the dune reference element // in the new numbering provided by the generic geometries const unsigned int tid = GenericGeometry::topologyId( duneGeometryType ); // for a subentity<codimension,oldNumber> get the new number newNumber = Numbering::template dune2generic< codimension >( tid, oldNumber ); // for a subentity<codimension,newNumber> get the old number oldNumber = Numbering::template generic2dune< codimension >( tid, newNumber );
Geometry type | Codim 1 | Codim 2 | Codim 3 |
---|---|---|---|
(Simplex,1) | identity | ||
(Cube,1) | identity | ||
(Simplex,2) | 2-index | identity | |
(Cube,2) | identity | identity | |
(Simplex,3) | 3-index | xchg(1,2) | identity |
(Cube,3) | identity | xchg(6,8), xchg(7,9) | identity |
(Prism,3) | see below | see below | identity |
(Pyramid,3) | see below | see below | xchg(3,2) |
Dune to generic | generic to Dune | |
---|---|---|
Codim 1 | (3,0,2,1,4) | (1,3,2,0,4) |
Codim 2 | (3,5,4,0,1,2,6,8,7) | (3,4,5,0,2,1,6,8,7) |
![]()
Face Numbering | ![]()
Edge Numbering |
![]()
Face Numbering | ![]()
Edge Numbering |
Dune to generic | generic to Dune | |
---|---|---|
Codim 1 | (0,3,2,4,1) | (0,4,2,1,3) |
Codim 2 | (2,1,3,0,4,5,7,6) | (3,1,0,2,4,5,7,6) |
![]()
Face Numbering | ![]()
Edge Numbering |
![]()
Face Numbering | ![]()
Edge Numbering |