From 016fbc235b968aed7708fa6cf80eb14c4b9ef862 Mon Sep 17 00:00:00 2001 From: Jonathan Youett <youett@math.fu-berlin.de> Date: Tue, 26 Sep 2017 12:31:35 +0200 Subject: [PATCH] Avoid deprecated template parameter of ReferenceElement by using auto --- dune/fufem/boundarypatch.hh | 4 ++-- dune/fufem/facehierarchy.hh | 8 +++----- dune/fufem/quadraturerules/lumpingquadraturerule.hh | 2 +- dune/fufem/referenceelementhelper.hh | 3 +-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dune/fufem/boundarypatch.hh b/dune/fufem/boundarypatch.hh index 72dcf96d..55b88694 100644 --- a/dune/fufem/boundarypatch.hh +++ b/dune/fufem/boundarypatch.hh @@ -137,7 +137,7 @@ public: const auto inside = i.inside(); int localFaceIndex = i.indexInInside(); - const Dune::ReferenceElement<double,dim>& refElement = Dune::ReferenceElements<double, dim>::general(inside.type()); + const auto& refElement = Dune::ReferenceElements<double, dim>::general(inside.type()); // Get global node ids int n = refElement.size(localFaceIndex, 1, dim); @@ -849,7 +849,7 @@ protected: for (; it!=endIt; ++it) { const auto inside = it->inside(); - const Dune::ReferenceElement<double,dim>& refElement = Dune::ReferenceElements<double, dim>::general(inside.type()); + const auto& refElement = Dune::ReferenceElements<double, dim>::general(inside.type()); // Get global node ids int n = refElement.size(it->indexInInside(),1,dim); diff --git a/dune/fufem/facehierarchy.hh b/dune/fufem/facehierarchy.hh index 23104ccc..2e4223f2 100644 --- a/dune/fufem/facehierarchy.hh +++ b/dune/fufem/facehierarchy.hh @@ -32,16 +32,14 @@ struct FaceHierarchy static bool isSubFace(const Element& father, const int fatherFace, const Element& son, const int sonFace) { - typedef Dune::ReferenceElement<double, dim> RE; - typedef typename RE::template Codim<1>::Geometry Mapping; typedef typename Element::LocalGeometry::GlobalCoordinate LocalFatherCoordinate; - const RE& fatherRefElement = Dune::ReferenceElements<double, dim>::general(father.type()); - const RE& sonRefElement = Dune::ReferenceElements<double, dim>::general(son.type()); + const auto& fatherRefElement = Dune::ReferenceElements<double, dim>::general(father.type()); + const auto& sonRefElement = Dune::ReferenceElements<double, dim>::general(son.type()); LocalFatherCoordinate centerInFather = son.geometryInFather().global(sonRefElement.position(sonFace, 1)); - const Mapping& mapping = fatherRefElement.template geometry<1>(fatherFace); + const auto& mapping = fatherRefElement.template geometry<1>(fatherFace); centerInFather -= mapping.global(mapping.local(centerInFather)); diff --git a/dune/fufem/quadraturerules/lumpingquadraturerule.hh b/dune/fufem/quadraturerules/lumpingquadraturerule.hh index e3da99fb..9dbb0c66 100644 --- a/dune/fufem/quadraturerules/lumpingquadraturerule.hh +++ b/dune/fufem/quadraturerules/lumpingquadraturerule.hh @@ -32,7 +32,7 @@ class LumpingQuadratureRule : LumpingQuadratureRule(const Dune::GeometryType& gt) : Base(gt, 1) { - const Dune::ReferenceElement<ct,dim>& refElement = Dune::ReferenceElements<ct, dim>::general(this->type()); + const auto& refElement = Dune::ReferenceElements<ct, dim>::general(this->type()); int size = refElement.size(dim); ct weight = refElement.volume()/size; this->reserve(size); diff --git a/dune/fufem/referenceelementhelper.hh b/dune/fufem/referenceelementhelper.hh index 98cd51e5..bee9b50a 100644 --- a/dune/fufem/referenceelementhelper.hh +++ b/dune/fufem/referenceelementhelper.hh @@ -37,8 +37,7 @@ struct ReferenceElementHelper // This use of ReferenceElement::subEntity is OK, // because we do a check for all passed indices. - const Dune::ReferenceElement<double,dim>& refElement - = Dune::ReferenceElements<double, dim>::general(gt); + const auto& refElement = Dune::ReferenceElements<double, dim>::general(gt); for (int k = 0; k < refElement.size(i, iCodim, jCodim); ++k) if (refElement.subEntity(i, iCodim, k, jCodim) == j) return true; -- GitLab