From 3f57260d7b5a1f755d0fac49d9af44f44b6c4973 Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Mon, 8 Jan 2018 14:55:41 +0100 Subject: [PATCH] Don't use deprecated template structure of ReferenceElement --- dune/fufem/functions/alienelementlocalbasisfunction.hh | 3 +-- dune/fufem/functionspacebases/p3nodalbasis.hh | 6 ++---- dune/fufem/test/subgridxyfunctionalassemblertest.cc | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dune/fufem/functions/alienelementlocalbasisfunction.hh b/dune/fufem/functions/alienelementlocalbasisfunction.hh index 97d73bb9..88e3b2e3 100644 --- a/dune/fufem/functions/alienelementlocalbasisfunction.hh +++ b/dune/fufem/functions/alienelementlocalbasisfunction.hh @@ -70,8 +70,7 @@ class AlienElementLocalBasisFunction : */ void evaluateAll(const DomainType& x, std::vector<RangeType>& yy) const { - const Dune::ReferenceElement<double, Entity::dimension>& alienRefElement - = Dune::ReferenceElements<double, Entity::dimension>::general(alienEntity_.type()); + const auto& alienRefElement = Dune::ReferenceElements<double, Entity::dimension>::general(alienEntity_.type()); const DomainType globalPosition = entity_.geometry().global(x); const DomainType alienLocalPosition = alienEntity_.geometry().local(globalPosition); diff --git a/dune/fufem/functionspacebases/p3nodalbasis.hh b/dune/fufem/functionspacebases/p3nodalbasis.hh index 8a1fc72d..c8bd9005 100644 --- a/dune/fufem/functionspacebases/p3nodalbasis.hh +++ b/dune/fufem/functionspacebases/p3nodalbasis.hh @@ -140,8 +140,7 @@ class P3NodalBasis : return edgeOffset_ + 2*indexSet.subIndex(e,0,0) + localKey.index(); else { - const Dune::ReferenceElement<double,dim>& refElement - = Dune::ReferenceElements<double,dim>::general(e.type()); + const auto& refElement = Dune::ReferenceElements<double,dim>::general(e.type()); // we have to reverse the numbering if the local triangle edge is // not aligned with the global edge @@ -169,8 +168,7 @@ class P3NodalBasis : else DUNE_THROW(Dune::NotImplemented, "2d elements have to be triangles or quadrilaterals"); } else { - const Dune::ReferenceElement<double,dim>& refElement - = Dune::ReferenceElements<double,dim>::general(e.type()); + const auto& refElement = Dune::ReferenceElements<double,dim>::general(e.type()); assert(refElement.type(localKey.subEntity(), localKey.codim()).isTriangle()); return triangleOffset_ + indexSet.subIndex(e,localKey.subEntity(),localKey.codim()); diff --git a/dune/fufem/test/subgridxyfunctionalassemblertest.cc b/dune/fufem/test/subgridxyfunctionalassemblertest.cc index 16fa6889..cdea3a32 100644 --- a/dune/fufem/test/subgridxyfunctionalassemblertest.cc +++ b/dune/fufem/test/subgridxyfunctionalassemblertest.cc @@ -102,7 +102,7 @@ void setupSubgridToHostgridTransfer(TransferOperatorType& matrix, const SubGridB const FLFE& fineFE = hostgridbasis.getLocalFiniteElement(*fIt); // we need the reference element to get the local position of the subentities corresponding to fine basis functions - const Dune::ReferenceElement<double,dim>& fineRefElement = Dune::ReferenceElements<double, dim>::general(fIt->type()); + const auto& fineRefElement = Dune::ReferenceElements<double, dim>::general(fIt->type()); // loop over all child nodes for (size_t j=0; j<fineFE.localBasis().size(); ++j) -- GitLab