diff --git a/fem/common/discretefunction.hh b/fem/common/discretefunction.hh
index 14e041a06737d5629316d190da03ac5ca65e6fbd..10c88f8691c5f56bbaedbef751b24b334d300a4a 100644
--- a/fem/common/discretefunction.hh
+++ b/fem/common/discretefunction.hh
@@ -1,6 +1,5 @@
 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 // vi: set et ts=4 sw=2 sts=2:
-
 #ifndef DUNE_DISCRETEFUNCTION_HH
 #define DUNE_DISCRETEFUNCTION_HH
 
@@ -90,6 +89,11 @@ namespace Dune {
       return asImp().name();
     }
 
+    //! The size of the discrete function
+    int size() const {
+      return asImp().size();
+    }
+
     //! the implementation of an iterator to iterate efficient
     //! over all dofs of a discrete function
     DofIteratorType dbegin ()