From 097b38b56fcc28aaeedaee04d6eb9079d63ad8e6 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Fri, 14 Jun 2019 13:11:56 +0200
Subject: [PATCH] Remove obsolete old 'energy' method

---
 dune/gfe/rodlocalstiffness.hh | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/dune/gfe/rodlocalstiffness.hh b/dune/gfe/rodlocalstiffness.hh
index 2d18ec67..aefa7887 100644
--- a/dune/gfe/rodlocalstiffness.hh
+++ b/dune/gfe/rodlocalstiffness.hh
@@ -96,17 +96,9 @@ public:
         referenceConfiguration_ = referenceConfiguration;
     }
 
-    /** \brief Local element energy for a P1 element */
-    virtual RT energy (const Entity& e,
-                       const std::array<RigidBodyMotion<RT,3>, dim+1>& localSolution) const;
-
+    /** \brief Compute local element energy */
     virtual RT energy (const typename Basis::LocalView& localView,
-                       const std::vector<RigidBodyMotion<RT,3> >& localSolution) const override
-    {
-        assert(localSolution.size()==2);
-        std::array<RigidBodyMotion<RT,3>, 2> localSolutionArray = {localSolution[0], localSolution[1]};
-        return energy(localView.element(),localSolutionArray);
-    }
+                       const std::vector<RigidBodyMotion<RT,3> >& localSolution) const override;
 
     /** \brief Assemble the element gradient of the energy functional */
     void assembleGradient(const typename Basis::LocalView& localView,
@@ -157,10 +149,12 @@ protected:
 
 template <class GridType, class RT>
 RT RodLocalStiffness<GridType, RT>::
-energy(const Entity& element,
-       const std::array<RigidBodyMotion<RT,3>, dim+1>& localSolution
-       ) const
+energy(const typename Basis::LocalView& localView,
+       const std::vector<RigidBodyMotion<RT,3> >& localSolution) const
 {
+    assert(localSolution.size()==2);
+    const auto& element = localView.element();
+
     RT energy = 0;
 
     std::vector<RigidBodyMotion<RT,3> > localReferenceConfiguration;
-- 
GitLab