Skip to content
Snippets Groups Projects
Commit 016fbc23 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Avoid deprecated template parameter of ReferenceElement by using auto

parent 085fe933
Branches
Tags
No related merge requests found
......@@ -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);
......
......@@ -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));
......
......@@ -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);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment