From 24fd3204b458a6ac097195d9765f128ed038a099 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Fri, 22 Jan 2016 06:35:54 +0100
Subject: [PATCH] Adapt to dune-functions basis interface

---
 dune/gfe/nonplanarcosseratshellenergy.hh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dune/gfe/nonplanarcosseratshellenergy.hh b/dune/gfe/nonplanarcosseratshellenergy.hh
index 8ddb04ac..8c7317c0 100644
--- a/dune/gfe/nonplanarcosseratshellenergy.hh
+++ b/dune/gfe/nonplanarcosseratshellenergy.hh
@@ -208,8 +208,7 @@ public:
   }
 
   /** \brief Assemble the energy for a single element */
-  RT energy (const Entity& e,
-             const LocalFiniteElement& localFiniteElement,
+  RT energy (const typename Basis::LocalView& localView,
              const std::vector<TargetSpace>& localSolution) const;
 
   RT W_m(const Dune::FieldMatrix<field_type,3,3>& S) const
@@ -262,15 +261,16 @@ public:
 template <class Basis, int dim, class field_type>
 typename NonplanarCosseratShellEnergy<Basis,dim,field_type>::RT
 NonplanarCosseratShellEnergy<Basis,dim,field_type>::
-energy(const Entity& element,
-       const typename Basis::LocalView::Tree::FiniteElement& localFiniteElement,
+energy(const typename Basis::LocalView& localView,
        const std::vector<RigidBodyMotion<field_type,dim> >& localSolution) const
 {
-  assert(element.type() == localFiniteElement.type());
-
   // The element geometry
+  auto element = localView.element();
   auto geometry = element.geometry();
 
+  // The set of shape functions on this element
+  const auto& localFiniteElement = localView.tree().finiteElement();
+
   ////////////////////////////////////////////////////////////////////////////////////
   //  Construct a linear (i.e., non-constant!) normal field on the surface
   ////////////////////////////////////////////////////////////////////////////////////
-- 
GitLab