diff --git a/dune/fem-dg/operator/adaptation/estimator.hh b/dune/fem-dg/operator/adaptation/estimator.hh index 84cd3aeb3c815fe075337c8141b02a7377896d09..deefff142b5b5309c09f80fc3fced68d7aed76eb 100644 --- a/dune/fem-dg/operator/adaptation/estimator.hh +++ b/dune/fem-dg/operator/adaptation/estimator.hh @@ -3,6 +3,7 @@ //- Dune-fem includes #include <dune/fem-dg/operator/adaptation/estimatorbase.hh> +#include <dune/fem/misc/compatibility.hh> // Estimator // --------- @@ -262,8 +263,7 @@ public: if( intersection.neighbor() ) { // access neighbor - typename ElementType::EntityPointer outside = intersection.outside(); - const ElementType& neighbor = *outside; + const ElementType neighbor = Fem::make_entity( intersection.outside() ); const int nbIdx = indexSet_.index( neighbor ); // handle face from one side only diff --git a/dune/fem-dg/operator/adaptation/utility.hh b/dune/fem-dg/operator/adaptation/utility.hh index 711c6e3a609fc541366afa4b27c1d0ea8f078799..b037101d7a9ec9fcdd1916fc69adbeab56395907 100644 --- a/dune/fem-dg/operator/adaptation/utility.hh +++ b/dune/fem-dg/operator/adaptation/utility.hh @@ -2,9 +2,9 @@ #define DUNE_ADAPTATION_UTILITY_HH // include restricion, prolongation and adaptation operator classes for discrete functions -#include <dune/common/version.hh> #include <dune/fem/io/parameter.hh> #include <dune/fem/gridpart/common/capabilities.hh> +#include <dune/fem/misc/compatibility.hh> namespace Dune { @@ -103,12 +103,7 @@ namespace Dune // otherwise write min and max volume on backup/restore if( hasGridHierarchy && entity.level() > 0 ) { -#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) - return findCoarsestVolume( entity.father(), hasGridHierarchy ); -#else - typename Entity::EntityPointer father = entity.father(); - return findCoarsestVolume( *father, hasGridHierarchy ); -#endif + return findCoarsestVolume( Fem::make_entity( entity.father() ), hasGridHierarchy ); } else // return entity's volume return entity.geometry().volume(); diff --git a/dune/fem-dg/operator/fluxes/dgprimalfluxes.hh b/dune/fem-dg/operator/fluxes/dgprimalfluxes.hh index f7dda60d497f27ac65b71ba0817d081fd2b8c930..6f713a1893dc52a6aad986c9532254e893b4cf89 100644 --- a/dune/fem-dg/operator/fluxes/dgprimalfluxes.hh +++ b/dune/fem-dg/operator/fluxes/dgprimalfluxes.hh @@ -1,6 +1,8 @@ #ifndef DUNE_FEM_DG_DGPRIMALFLUXES_HH #define DUNE_FEM_DG_DGPRIMALFLUXES_HH +#include <dune/common/version.hh> + #include <dune/fem/misc/fmatrixconverter.hh> #include <dune/fem/operator/1order/localmassmatrix.hh> #include <dune/fem/pass/localdg/discretemodel.hh> @@ -193,7 +195,7 @@ namespace Dune { for( IteratorType it = gridPart.template begin<0>(); it != itend; ++it ) { const EntityType& entity = * it ; - const double insideVol = entity->geometry().volume(); + const double insideVol = entity.geometry().volume(); int numFaces = 0; int numOutflowFaces = 0; const IntersectionIteratorType intitend = gridPart.iend( entity ); @@ -205,7 +207,11 @@ namespace Dune { ++numFaces ; if ( intersection.neighbor() ) { +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + double outsideVol = intersection.outside().geometry().volume(); +#else double outsideVol = intersection.outside()->geometry().volume(); +#endif numOutflowFaces += (determineDirection(areaSwitch_, insideVol,outsideVol,intersection) ? 1 : 0); if ( !areaSwitch_ || insideVol/outsideVol < 1) maxNeighborsVolumeRatio_ = std::max( maxNeighborsVolumeRatio_, insideVol/outsideVol ); diff --git a/dune/fem-dg/pass/dgmodelcaller.hh b/dune/fem-dg/pass/dgmodelcaller.hh index 40de6ea7e9c6fa0422e3841c416d89ff2c0e28d0..20f2a634a787551dcd9bc696690bbc8d0e1fe56e 100644 --- a/dune/fem-dg/pass/dgmodelcaller.hh +++ b/dune/fem-dg/pass/dgmodelcaller.hh @@ -6,6 +6,7 @@ #include <dune/fem/pass/localdg/modelcaller.hh> #include <dune/fem/version.hh> +#include <dune/fem/misc/compatibility.hh> namespace Dune { @@ -109,7 +110,7 @@ namespace Dune { assert( intersection.boundary() ); - BaseType::setBoundary( *(intersection.inside()), quadrature ); + BaseType::setBoundary( Fem::make_entity( intersection.inside() ), quadrature ); if( evaluateJacobian ) { jacobiansInside_.resize( quadrature.nop() ); diff --git a/dune/fem-dg/pass/dgpass.hh b/dune/fem-dg/pass/dgpass.hh index c158c44dfddff67caec35996bd3437fff7e92538..0c8a3b49c4f4628f8ba082a7c9b719bf7101a944 100644 --- a/dune/fem-dg/pass/dgpass.hh +++ b/dune/fem-dg/pass/dgpass.hh @@ -17,6 +17,7 @@ #include <dune/fem/space/common/arrays.hh> #include <dune/fem-dg/pass/dgmodelcaller.hh> +#include <dune/fem/misc/compatibility.hh> namespace Dune { /*! @addtogroup PassHyp @@ -545,8 +546,7 @@ namespace Dune { if( intersection.neighbor() ) { // get neighbor - typename EntityType::EntityPointer outside = intersection.outside(); - const EntityType & nb = * outside; + const EntityType nb = Fem::make_entity( intersection.outside() ); // check whether we have to skip this intersection if( nbChecker.skipIntersection( nb ) )