Commit d7249a55 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

implicit models: get rid of DUNE 2.3 warnings for using GenericReferenceElement(s)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11448 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 15f86f7c
......@@ -73,8 +73,13 @@ protected:
};
enum { pressureIdx = Indices::pressureIdx }; //!< Index of the pressure in a solution vector
typedef Dune::GenericReferenceElements<Scalar, dim> ReferenceElements;
typedef Dune::GenericReferenceElement<Scalar, dim> ReferenceElement;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Dune::ReferenceElements<Scalar, dim> ReferenceElements;
typedef typename Dune::ReferenceElement<Scalar, dim> ReferenceElement;
#else
typedef typename Dune::GenericReferenceElements<Scalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<Scalar, dim> ReferenceElement;
#endif
typedef Dune::FieldVector<Scalar, dim> DimVector;
......
......@@ -384,11 +384,20 @@ public:
int faceIdx = isIt->indexInInside();
// get dimension of face
const int dimIs = Dune::PDELab::IntersectionGeometry<Intersection>::Entity::Geometry::dimension;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
// get reference element for intersection geometry (reference element for face if dim = 3)
const Dune::ReferenceElement<DT,dimIs>& refelem = Dune::ReferenceElements<DT,dimIs>::general(gt);
// get reference element for edges of intersection geometry (reference element for edge if dim = 3), needed for Dirichlet BC
const Dune::ReferenceElement<DT,dimIs-1> &face_refelem
= Dune::ReferenceElements<DT,dimIs-1>::general(isIt->geometryInInside().type());
#else
// get reference element for intersection geometry (reference element for face if dim = 3)
const Dune::GenericReferenceElement<DT,dimIs>& refelem = Dune::GenericReferenceElements<DT,dimIs>::general(gt);
// get reference element for edges of intersection geometry (reference element for edge if dim = 3), needed for Dirichlet BC
const Dune::GenericReferenceElement<DT,dimIs-1> &face_refelem
= Dune::GenericReferenceElements<DT,dimIs-1>::general(isIt->geometryInInside().type());
#endif
// Treat Neumann boundary conditions
// loop over quadrature points and integrate normal stress changes (traction changes)
......
......@@ -68,6 +68,14 @@ protected:
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Dune::FieldVector<Scalar, dimWorld> Vector;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Dune::ReferenceElements<DT, dim> ReferenceElements;
typedef typename Dune::ReferenceElement<DT, dim> ReferenceElement;
#else
typedef typename Dune::GenericReferenceElements<DT, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<DT, dim> ReferenceElement;
#endif
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public:
......@@ -130,8 +138,7 @@ public:
* Calculate the fracture volume fraction wf = 0.5 * Fwidth * 0.5 * Length
*/
Dune::GeometryType gt = elem.geometry().type();
const typename Dune::GenericReferenceElementContainer<DT,dim>::value_type&
refElement = Dune::GenericReferenceElements<DT,dim>::general(gt);
const ReferenceElement &refElement = ReferenceElements::general(gt);
Scalar vol; //subcontrol volume
FVElementGeometry fvelem = this->fvGeometry_();
......
......@@ -333,8 +333,12 @@ class BoxFVElementGeometry
typedef typename GridView::IntersectionIterator IntersectionIterator;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed;
typedef typename Dune::ReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::ReferenceElement<CoordScalar, dim> ReferenceElement;
#else
typedef typename Geometry::Jacobian JacobianInverseTransposed;
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
#endif
typedef Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1> LocalFiniteElementCache;
......@@ -607,8 +611,7 @@ public:
const Geometry& geometry = element.geometry();
Dune::GeometryType gt = geometry.type();
const typename Dune::GenericReferenceElementContainer<CoordScalar,dim>::value_type&
referenceElement = Dune::GenericReferenceElements<CoordScalar,dim>::general(gt);
const ReferenceElement &referenceElement = ReferenceElements::general(gt);
const LocalFiniteElement
&localFiniteElement = feCache_.get(gt);
......
......@@ -59,8 +59,13 @@ class BoxLocalResidual : public ImplicitLocalResidual<TypeTag>
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef typename GridView::Grid::ctype CoordScalar;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Dune::ReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::ReferenceElement<CoordScalar, dim> ReferenceElement;
#else
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
#endif
typedef typename GET_PROP_TYPE(TypeTag, VertexMapper) VertexMapper;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
......
......@@ -69,8 +69,13 @@ class ImplicitModel
typedef typename GridView::template Codim<0>::Iterator ElementIterator;
typedef typename GridView::IntersectionIterator IntersectionIterator;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Dune::ReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::ReferenceElement<CoordScalar, dim> ReferenceElement;
#else
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
typedef typename Dune::GenericReferenceElement<CoordScalar, dim> ReferenceElement;
#endif
enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) };
enum { dofCodim = isBox ? dim : 0 };
......
......@@ -60,6 +60,12 @@ class ImplicitVelocityOutput
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Dune::ReferenceElements<CoordScalar, dim> ReferenceElements;
#else
typedef typename Dune::GenericReferenceElements<CoordScalar, dim> ReferenceElements;
#endif
enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) };
enum { dofCodim = isBox ? dim : 0 };
......@@ -124,7 +130,6 @@ public:
// calculate vertex velocities
GlobalPosition tmpVelocity(0.0);
typedef Dune::GenericReferenceElements<Scalar, dim> ReferenceElements;
const Dune::FieldVector<Scalar, dim>& localPos =
ReferenceElements::general(element.geometry().type()).position(0, 0);
......
......@@ -42,6 +42,11 @@ class VtkNestedFunction : public Dune::VTKFunction<GridView>
enum { dim = GridView::dimension };
typedef typename GridView::ctype ctype;
typedef typename GridView::template Codim<0>::Entity Element;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Dune::ReferenceElements<ctype, dim> ReferenceElements;
#else
typedef typename Dune::GenericReferenceElements<ctype, dim> ReferenceElements;
#endif
public:
VtkNestedFunction(std::string name,
......@@ -85,8 +90,7 @@ public:
for (int i=0; i < n; ++i)
{
Dune::FieldVector<ctype,dim> local =
Dune::GenericReferenceElements<ctype,dim>::general(gt)
.position(i,dim);
ReferenceElements::general(gt).position(i,dim);
local -= xi;
if (local.infinity_norm()<min)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment