#1180 Special geometry implementation for axis-aligned cubes [PATCH]
Metadata
Property | Value |
---|---|
Reported by | Oliver Sander (oliver.sander@tu-dresden.de) |
Reported at | Sep 11, 2012 15:39 |
Type | Feature Request |
Version | 2.2 |
Operating System | Unspecified / All |
Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
Last edited at | Sep 26, 2012 06:32 |
Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
Closed at | Sep 26, 2012 06:32 |
Closed in version | Unknown |
Resolution | Implemented |
Comment |
Description
Following the Dune spirit, dune-geometry could become a collecting point for various implementations of the Geometry interface. These implementations would cater for different needs, some for common cases, some for exotic ones.
A useful first implementation is available in the form of BasicGeometry (or better: its mappings), which does first order geometry with and without dynamic type change, and optional caching.
I propose a new additional implementation for axis-aligned cubes. This is a common case needed for structured grids, and for all hexahedral grids (for the local geometries). Since axis-aligned cubes have a lot of structure, a dedicated implementation can be very fast. In particular, following the recent change in the Geometry interface, if cube dimension and world dimension are the same, then a DiagonalMatrix can be used for the jacobians. This is expected to save some copying and multiplication times.
Attached are:
- The geometry implementation, to go into dune-geometry/dune/geometry
- A unit test
- A patch for refinement/hcube.cc, which changes the BasicGeometry used there to a AxisAlignedCubeGeometry
Caveat: the implementation needs the DiagonalMatrix class, which is currently in dune-istl (which is not a dependency of dune-geometry). Applying my patches includes moving diagonalmatrix.hh to dune-common.
Are there objections to committing this? Comments?