diff --git a/ebos/femcpgridcompat.hh b/ebos/femcpgridcompat.hh index 1e3c316e3..afe6078af 100644 --- a/ebos/femcpgridcompat.hh +++ b/ebos/femcpgridcompat.hh @@ -37,67 +37,54 @@ #include #include -namespace Dune -{ +namespace Dune { +namespace cpgrid { +template +class Entity; - namespace cpgrid - { - template - class Entity; +template +class EntityPointer; +} - template - class EntityPointer; - } - -#if DUNE_VERSION_NEWER( DUNE_FEM, 2, 6 ) - template - auto referenceElement(const Dune::cpgrid::Geometry& geo) - -> decltype(referenceElement(geo.type())) - { - return referenceElement(geo.type()); - } +#if DUNE_VERSION_NEWER(DUNE_FEM, 2, 6) +template +auto referenceElement(const Dune::cpgrid::Geometry& geo) + -> decltype(referenceElement(geo.type())) +{ return referenceElement(geo.type()); } #endif - // specialization of dune-fem compatiblity functions for CpGrid, since CpGrid does not use the interface classes. - namespace Fem - { +// specialization of dune-fem compatiblity functions for CpGrid, since CpGrid does not use the interface classes. +namespace Fem { - //////////////////////////////////////////////////////////// - // - // make_entity for CpGrid entities - // - //////////////////////////////////////////////////////////// - template - inline Dune::cpgrid::Entity< codim > make_entity ( const Dune::cpgrid::EntityPointer< codim >& entityPointer ) - { - return *entityPointer; - } +//////////////////////////////////////////////////////////// +// +// make_entity for CpGrid entities +// +//////////////////////////////////////////////////////////// +template +inline Dune::cpgrid::Entity make_entity(const Dune::cpgrid::EntityPointer& entityPointer) +{ return *entityPointer; } - template - inline Dune::cpgrid::Entity make_entity ( Dune::cpgrid::Entity entity ) - { - return std::move( entity ); - } +template +inline Dune::cpgrid::Entity make_entity(Dune::cpgrid::Entity entity) +{ return std::move(entity); } - //////////////////////////////////////////////////////////// - // - // GridEntityAccess for CpGrid entities - // - //////////////////////////////////////////////////////////// - template< int codim > - struct GridEntityAccess< Dune::cpgrid::Entity< codim > > - { +//////////////////////////////////////////////////////////// +// +// GridEntityAccess for CpGrid entities +// +//////////////////////////////////////////////////////////// +template +struct GridEntityAccess > +{ + typedef Dune::cpgrid::Entity EntityType; + typedef EntityType GridEntityType; - typedef Dune::cpgrid::Entity< codim > EntityType; - typedef EntityType GridEntityType; + static const GridEntityType& gridEntity(const EntityType& entity) + { return entity; } +}; - static const GridEntityType& gridEntity ( const EntityType& entity ) - { - return entity; - } - }; - - } // namespace Fem +} // namespace Fem } // end namespace Dune