diff --git a/dune/gfe/localenergy.hh b/dune/gfe/localenergy.hh
index ba6f8da46fcd2db1323418662ecf1b74dc2ff867..d80c0f0f5a01ea8c9645cac690a03ae3c0c9c4b9 100644
--- a/dune/gfe/localenergy.hh
+++ b/dune/gfe/localenergy.hh
@@ -8,19 +8,20 @@ namespace Dune {
 namespace GFE {
 
 /** \brief Base class for energies defined by integrating over one grid element */
-template<class Basis, class TargetSpace>
+template<class Basis, class... TargetSpaces>
 class LocalEnergy
 {
 public:
+  using RT = typename std::common_type<typename TargetSpaces::ctype...>::type;
 
   /** \brief Compute the energy
    *
    * \param localView Local view specifying the current element and the FE space there
    * \param coefficients The coefficients of a FE function on the current element
    */
-  virtual typename TargetSpace::ctype
+  virtual RT
   energy (const typename Basis::LocalView& localView,
-          const std::vector<TargetSpace>& localSolution) const = 0;
+          const std::vector<TargetSpaces>&... localSolution) const = 0;
 
   /** Empty virtual default destructor
    *