From 609488331fbd0558990b20bc88ab9a230e7a98f5 Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@mathe-macht-spass.de> Date: Sat, 5 Nov 2016 21:00:20 +0000 Subject: [PATCH] Merge branch 'feature/remove-generic-geometry' into 'master' remove genericgeometry subdirectory from dune-geometry The removal of the `genericgeometry` subdirectory in dune-geometry will require some minor changes to dune-grid. This merge request collects those and should be merged once the corresponding branch in dune-geometry is merged, too. See merge request !120 --- dune/grid/albertagrid/albertareader.hh | 4 +++- dune/grid/albertagrid/capabilities.hh | 6 +++--- dune/grid/albertagrid/dgfparser.cc | 6 ++++-- dune/grid/albertagrid/entity.cc | 4 ++-- dune/grid/albertagrid/geometry.hh | 4 ++-- dune/grid/albertagrid/gridfactory.hh | 2 +- dune/grid/albertagrid/intersection.cc | 2 +- dune/grid/geometrygrid/geometry.hh | 9 +++++---- dune/grid/onedgrid.hh | 4 ++-- dune/grid/uggrid/uggridindexsets.hh | 1 + dune/grid/yaspgrid.hh | 4 ++-- 11 files changed, 26 insertions(+), 20 deletions(-) diff --git a/dune/grid/albertagrid/albertareader.hh b/dune/grid/albertagrid/albertareader.hh index b5d5a501ba..4069ba283d 100644 --- a/dune/grid/albertagrid/albertareader.hh +++ b/dune/grid/albertagrid/albertareader.hh @@ -3,6 +3,8 @@ #ifndef DUNE_ALBERTA_ALBERTAREADER_HH #define DUNE_ALBERTA_ALBERTAREADER_HH +#include <dune/geometry/type.hh> + #include <dune/grid/common/grid.hh> #include <dune/grid/common/gridfactory.hh> @@ -65,7 +67,7 @@ namespace Dune const typename MacroData::ElementId &id = macroData_.element( i ); for( int j = 0; j <= dimension; ++j ) vertices[ j ] = id[ j ]; - typedef typename GenericGeometry::SimplexTopology< dimension >::type Topology; + typedef typename Impl::SimplexTopology< dimension >::type Topology; factory.insertElement( GeometryType( Topology() ), vertices ); } diff --git a/dune/grid/albertagrid/capabilities.hh b/dune/grid/albertagrid/capabilities.hh index 4fef51826a..c43b89915c 100644 --- a/dune/grid/albertagrid/capabilities.hh +++ b/dune/grid/albertagrid/capabilities.hh @@ -3,9 +3,9 @@ #ifndef DUNE_ALBERTA_CAPABILITIES_HH #define DUNE_ALBERTA_CAPABILITIES_HH -#include <dune/grid/common/capabilities.hh> -#include <dune/geometry/genericgeometry/topologytypes.hh> +#include <dune/geometry/type.hh> +#include <dune/grid/common/capabilities.hh> #if HAVE_ALBERTA @@ -33,7 +33,7 @@ namespace Dune struct hasSingleGeometryType< AlbertaGrid< dim, dimworld > > { static const bool v = true; - static const unsigned int topologyId = GenericGeometry :: SimplexTopology< dim > :: type :: id ; + static const unsigned int topologyId = Impl::SimplexTopology< dim >::type::id; }; diff --git a/dune/grid/albertagrid/dgfparser.cc b/dune/grid/albertagrid/dgfparser.cc index cb7e8035bd..a85264e58e 100644 --- a/dune/grid/albertagrid/dgfparser.cc +++ b/dune/grid/albertagrid/dgfparser.cc @@ -5,6 +5,8 @@ // compile surface grid support into the lib even for ALBERTA 2.0 #define DUNE_ALBERTA_SURFACE_GRID 1 +#include <dune/geometry/type.hh> + #include <dune/grid/albertagrid/dgfparser.hh> #if HAVE_ALBERTA @@ -52,7 +54,7 @@ namespace Dune elementId[ i ] = dgf_.elements[ n ][ i ]; } - typedef typename GenericGeometry::SimplexTopology< dimension >::type Topology; + typedef typename Impl::SimplexTopology< dimension >::type Topology; factory_.insertElement( GeometryType( Topology() ), elementId ); // look for bounaries and insert them @@ -101,7 +103,7 @@ namespace Dune const std::vector< unsigned int > &vertices = projectionBlock.boundaryFace( i ); const DuneBoundaryProjection< dimworld > *projection = projectionBlock.template boundaryProjection< dimworld >( i ); - typedef typename GenericGeometry::SimplexTopology< dimension-1 >::type Topology; + typedef typename Impl::SimplexTopology< dimension-1 >::type Topology; factory_.insertBoundaryProjection( GeometryType( Topology() ), vertices, projection ); } diff --git a/dune/grid/albertagrid/entity.cc b/dune/grid/albertagrid/entity.cc index 0d2e6ab3ba..52461331b4 100644 --- a/dune/grid/albertagrid/entity.cc +++ b/dune/grid/albertagrid/entity.cc @@ -111,7 +111,7 @@ namespace Dune template< int codim, int dim, class Grid > inline GeometryType AlbertaGridEntity< codim, dim, Grid >::type () const { - typedef typename GenericGeometry::SimplexTopology< mydimension >::type Topology; + typedef typename Impl::SimplexTopology< mydimension >::type Topology; return GeometryType( Topology() ); } @@ -267,7 +267,7 @@ namespace Dune template< int dim, class Grid > inline GeometryType AlbertaGridEntity< 0, dim, Grid>::type () const { - typedef typename GenericGeometry::SimplexTopology< mydimension >::type Topology; + typedef typename Impl::SimplexTopology< mydimension >::type Topology; return GeometryType( Topology() ); } diff --git a/dune/grid/albertagrid/geometry.hh b/dune/grid/albertagrid/geometry.hh index edebe8abb2..7d96c4bda4 100644 --- a/dune/grid/albertagrid/geometry.hh +++ b/dune/grid/albertagrid/geometry.hh @@ -147,7 +147,7 @@ namespace Dune /** \brief obtain the type of reference element */ GeometryType type () const { - typedef typename GenericGeometry::SimplexTopology< mydimension >::type Topology; + typedef typename Impl::SimplexTopology< mydimension >::type Topology; return GeometryType( Topology() ); } @@ -349,7 +349,7 @@ namespace Dune /** \brief obtain the type of reference element */ GeometryType type () const { - typedef typename GenericGeometry::SimplexTopology< mydimension >::type Topology; + typedef typename Impl::SimplexTopology< mydimension >::type Topology; return GeometryType( Topology() ); } diff --git a/dune/grid/albertagrid/gridfactory.hh b/dune/grid/albertagrid/gridfactory.hh index 72c08df563..b6ffeb96cd 100644 --- a/dune/grid/albertagrid/gridfactory.hh +++ b/dune/grid/albertagrid/gridfactory.hh @@ -214,7 +214,7 @@ namespace Dune virtual void insertBoundarySegment ( const std::vector< unsigned int >& vertices ) { - typedef typename GenericGeometry::SimplexTopology< dimension-1 >::type Topology; + typedef typename Impl::SimplexTopology< dimension-1 >::type Topology; insertBoundaryProjection( GeometryType( Topology() ), vertices, 0 ); } diff --git a/dune/grid/albertagrid/intersection.cc b/dune/grid/albertagrid/intersection.cc index c5de791f9d..d5f4c55865 100644 --- a/dune/grid/albertagrid/intersection.cc +++ b/dune/grid/albertagrid/intersection.cc @@ -79,7 +79,7 @@ namespace Dune template< class Grid > inline GeometryType AlbertaGridIntersectionBase< Grid >::type () const { - typedef typename GenericGeometry::SimplexTopology< dimension-1 >::type Topology; + typedef typename Impl::SimplexTopology< dimension-1 >::type Topology; return GeometryType( Topology() ); } diff --git a/dune/grid/geometrygrid/geometry.hh b/dune/grid/geometrygrid/geometry.hh index 903499f82d..f98c101879 100644 --- a/dune/grid/geometrygrid/geometry.hh +++ b/dune/grid/geometrygrid/geometry.hh @@ -7,8 +7,9 @@ #include <dune/common/typetraits.hh> -#include <dune/geometry/referenceelements.hh> #include <dune/geometry/multilineargeometry.hh> +#include <dune/geometry/referenceelements.hh> +#include <dune/geometry/type.hh> #include <dune/grid/common/capabilities.hh> #include <dune/grid/geometrygrid/cornerstorage.hh> @@ -38,14 +39,14 @@ namespace Dune struct InferHasSingleGeometryType< hasSingleGeometryType, dim, 1 > { static const bool v = true; - static const unsigned int topologyId = GenericGeometry::CubeTopology< 1 >::type::id; + static const unsigned int topologyId = Impl::CubeTopology< 1 >::type::id; }; template< class hasSingleGeometryType, int dim > struct InferHasSingleGeometryType< hasSingleGeometryType, dim, 0 > { static const bool v = true; - static const unsigned int topologyId = GenericGeometry::CubeTopology< 0 >::type::id; + static const unsigned int topologyId = Impl::CubeTopology< 0 >::type::id; }; @@ -60,7 +61,7 @@ namespace Dune typedef typename Traits::ctype ctype; - typedef GenericGeometry::MatrixHelper< GenericGeometry::DuneCoordTraits< ctype > > MatrixHelper; + typedef Impl::FieldMatrixHelper< ctype > MatrixHelper; static ctype tolerance () { return 16 * std::numeric_limits< ctype >::epsilon(); } diff --git a/dune/grid/onedgrid.hh b/dune/grid/onedgrid.hh index 8eaa9b463f..e6cc14dd98 100644 --- a/dune/grid/onedgrid.hh +++ b/dune/grid/onedgrid.hh @@ -13,8 +13,8 @@ #include <dune/grid/common/grid.hh> #include <dune/grid/common/gridfactory.hh> -#include <dune/geometry/genericgeometry/topologytypes.hh> #include <dune/geometry/axisalignedcubegeometry.hh> +#include <dune/geometry/type.hh> /** \file * \brief The OneDGrid class @@ -419,7 +419,7 @@ namespace Dune { struct hasSingleGeometryType< OneDGrid > { static const bool v = true; - static const unsigned int topologyId = GenericGeometry :: CubeTopology< 1 > :: type :: id ; + static const unsigned int topologyId = Impl::CubeTopology< 1 >::type::id; }; diff --git a/dune/grid/uggrid/uggridindexsets.hh b/dune/grid/uggrid/uggridindexsets.hh index 80fdced6cf..a84ea91a11 100644 --- a/dune/grid/uggrid/uggridindexsets.hh +++ b/dune/grid/uggrid/uggridindexsets.hh @@ -11,6 +11,7 @@ #include <set> #include <dune/common/hybridutilities.hh> +#include <dune/common/std/type_traits.hh> #include <dune/grid/common/grid.hh> namespace Dune { diff --git a/dune/grid/yaspgrid.hh b/dune/grid/yaspgrid.hh index 73c95d9bed..e9901ecc40 100644 --- a/dune/grid/yaspgrid.hh +++ b/dune/grid/yaspgrid.hh @@ -25,8 +25,8 @@ typedef unsigned char uint8_t; #include <dune/common/parallel/collectivecommunication.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/common/deprecated.hh> -#include <dune/geometry/genericgeometry/topologytypes.hh> #include <dune/geometry/axisalignedcubegeometry.hh> +#include <dune/geometry/type.hh> #include <dune/grid/common/indexidset.hh> #include <dune/grid/common/datahandleif.hh> @@ -1804,7 +1804,7 @@ namespace Dune { struct hasSingleGeometryType< YaspGrid<dim, Coordinates> > { static const bool v = true; - static const unsigned int topologyId = GenericGeometry :: CubeTopology< dim > :: type :: id ; + static const unsigned int topologyId = Impl::CubeTopology< dim >::type::id; }; /** \brief YaspGrid is a Cartesian grid -- GitLab