From c5fe0f317728bdbb407106556342a08fe5e22185 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 6 Feb 2015 16:52:18 +0000 Subject: [PATCH] Use method 'subEntities' instead of 'count' if Dune version is at least 2.4 Patch by Jonathan Youett [[Imported from SVN: r10055]] --- dune/gfe/geodesicfefunctionadaptor.hh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dune/gfe/geodesicfefunctionadaptor.hh b/dune/gfe/geodesicfefunctionadaptor.hh index b56bbde1..e31102f8 100644 --- a/dune/gfe/geodesicfefunctionadaptor.hh +++ b/dune/gfe/geodesicfefunctionadaptor.hh @@ -59,7 +59,11 @@ static void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>& for (; eIt!=eEndIt; ++eIt) { // Set up a local gfe function on the father element +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + size_t nFatherDofs = eIt->father()->subEntities(dim); +#else size_t nFatherDofs = eIt->father()->template count<dim>(); +#endif std::vector<TargetSpace> coefficients(nFatherDofs); for (int i=0; i<nFatherDofs; i++) @@ -72,7 +76,12 @@ static void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>& // The embedding of this element into the father geometry const typename GridType::template Codim<0>::LocalGeometry& geometryInFather = eIt->geometryInFather(); - for (int i=0; i<eIt->template count<dim>(); i++) { +#if DUNE_VERSION_NEWER(DUNE_GRID,2,4) + size_t nDofs = eIt->subEntities(dim); +#else + size_t nDofs = eIt->template count<dim>(); +#endif + for (int i=0; i<nDofs; i++) { if (dofMap.find(idSet.subId(*eIt,i,dim)) != dofMap.end()) { -- GitLab