Index: src/Jobs/Grid/Makefile.am
===================================================================
--- src/Jobs/Grid/Makefile.am	(revision b123a57242414c8d345a18a31cf4a42a81222702)
+++ src/Jobs/Grid/Makefile.am	(revision 620517d20d9663ecc219b492f249366f59b31b0a)
@@ -8,4 +8,5 @@
 JOBSGRIDHEADER = \
 	Jobs/Grid/SamplingGrid.hpp \
+	Jobs/Grid/SamplingGrid_inline.hpp \
 	Jobs/Grid/SamplingGridProperties.hpp
 
Index: src/Jobs/Grid/SamplingGrid.cpp
===================================================================
--- src/Jobs/Grid/SamplingGrid.cpp	(revision b123a57242414c8d345a18a31cf4a42a81222702)
+++ src/Jobs/Grid/SamplingGrid.cpp	(revision 620517d20d9663ecc219b492f249366f59b31b0a)
@@ -169,37 +169,17 @@
 }
 
-const double SamplingGrid::getVolume() const
-{
-  double volume = 1.;
-  for (size_t i=0;i<3;++i)
-    volume *= end[i]-begin[i];
-  return volume;
-}
-
-const double SamplingGrid::getWindowVolume() const
-{
-  double volume = 1.;
-  for (size_t i=0;i<3;++i)
-    volume *= end_window[i]-begin_window[i];
-  return volume;
-}
-
-const size_t SamplingGrid::getTotalGridPoints() const
-{
-  return pow(getGridPointsPerAxis(),3);
-}
-
-const size_t SamplingGrid::getGridPointsPerAxis() const
-{
-  return pow(2, level);
-}
-
-const size_t SamplingGrid::getWindowGridPoints() const
-{
-  const double volume = getVolume();
-  if (fabs(volume) < std::numeric_limits<double>::epsilon())
+const size_t SamplingGrid::getWindowGridPointsPerAxis(const size_t axis) const
+{
+  static const double round_offset(
+      (std::numeric_limits<size_t>::round_style == std::round_toward_zero) ?
+          0.5 : 0.); // need offset to get to round_toward_nearest behavior
+//  const double total = getTotalLengthPerAxis(axis);
+  const double delta = getDeltaPerAxis(axis);
+  if (delta == 0)
     return 0;
-  else
-    return (getWindowVolume()*getTotalGridPoints())/volume;
+  const double length = getWindowLengthPerAxis(axis);
+  if (length == 0)
+    return 0;
+  return (size_t)(length/delta+round_offset);
 }
 
@@ -283,14 +263,4 @@
   sampled_grid.clear();
   sampled_grid.resize(gridpoints_window, 0.);
-}
-
-void SamplingGrid::setDomainSize(
-    const double _begin[3],
-    const double _end[3])
-{
-  for (size_t index=0;index<3;++index) {
-    begin[index] = _begin[index];
-    end[index] = _end[index];
-  }
 }
 
Index: src/Jobs/Grid/SamplingGrid.hpp
===================================================================
--- src/Jobs/Grid/SamplingGrid.hpp	(revision b123a57242414c8d345a18a31cf4a42a81222702)
+++ src/Jobs/Grid/SamplingGrid.hpp	(revision 620517d20d9663ecc219b492f249366f59b31b0a)
@@ -159,4 +159,12 @@
   const size_t getWindowGridPoints() const;
 
+  /** Returns the number of gridpoints of the discrete mesh for the current
+   * window size for given axis \axis.
+   *
+   * \param axis axis to calculate number of gridpoints for
+   * \return number of gridpoints along this axis
+   */
+  const size_t getWindowGridPointsPerAxis(const size_t axis) const;
+
   /** Returns the total number of gridpoints of the discrete mesh covering the volume.
    *
@@ -170,4 +178,25 @@
    */
   const size_t getGridPointsPerAxis() const;
+
+  /** Returns the length of the domain for the given \a axis.
+   *
+   * \param axis axis for which to get step length
+   * \return domain length for the given axis, i.e. end - begin
+   */
+  const double getTotalLengthPerAxis(const size_t axis) const;
+
+  /** Returns the length of the window for the given \a axis.
+   *
+   * \param axis axis for which to get step length
+   * \return window length for the given axis, i.e. end - begin
+   */
+  const double getWindowLengthPerAxis(const size_t axis) const;
+
+  /** Returns the real step length from one discrete grid point to the next.
+   *
+   * \param axis axis for which to get step length
+   * \return step length for the given axis, as domain length over getGridPointsPerAxis()
+   */
+  const double getDeltaPerAxis(const size_t axis) const;
 
   /** Returns the volume of the domain covered by the current window.
@@ -311,3 +340,6 @@
 BOOST_CLASS_EXPORT_KEY(SamplingGrid)
 
+// define inline functions
+#include "SamplingGrid_inline.hpp"
+
 #endif /* SAMPLINGGRID_HPP_ */
Index: src/Jobs/Grid/SamplingGrid_inline.hpp
===================================================================
--- src/Jobs/Grid/SamplingGrid_inline.hpp	(revision 620517d20d9663ecc219b492f249366f59b31b0a)
+++ src/Jobs/Grid/SamplingGrid_inline.hpp	(revision 620517d20d9663ecc219b492f249366f59b31b0a)
@@ -0,0 +1,106 @@
+/*
+ * SamplingGrid_inline.hpp
+ *
+ *  Created on: Jan 27, 2013
+ *      Author: heber
+ */
+
+#ifndef SAMPLINGGRID_INLINE_HPP_
+#define SAMPLINGGRID_INLINE_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "SamplingGrid.hpp"
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const double SamplingGrid::getVolume() const
+{
+  double volume = 1.;
+  for (size_t i=0;i<3;++i)
+    volume *= end[i]-begin[i];
+  return volume;
+}
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const double SamplingGrid::getWindowVolume() const
+{
+  double volume = 1.;
+  for (size_t i=0;i<3;++i)
+    volume *= end_window[i]-begin_window[i];
+  return volume;
+}
+
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const size_t SamplingGrid::getTotalGridPoints() const
+{
+  return pow(getGridPointsPerAxis(),3);
+}
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const size_t SamplingGrid::getGridPointsPerAxis() const
+{
+  return pow(2, level);
+}
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const double SamplingGrid::getDeltaPerAxis(const size_t axis) const
+{
+  return getTotalLengthPerAxis(axis)/(double)getGridPointsPerAxis();
+}
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const double SamplingGrid::getTotalLengthPerAxis(const size_t axis) const
+{
+  return (end[axis] - begin[axis]);
+}
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const double SamplingGrid::getWindowLengthPerAxis(const size_t axis) const
+{
+  return (end_window[axis] - begin_window[axis]);
+}
+
+#ifdef HAVE_INLINE
+inline
+#endif
+const size_t SamplingGrid::getWindowGridPoints() const
+{
+  return getWindowGridPointsPerAxis(0)
+      *getWindowGridPointsPerAxis(1)
+      *getWindowGridPointsPerAxis(2);
+}
+
+
+#ifdef HAVE_INLINE
+inline
+#endif
+void SamplingGrid::setDomainSize(
+    const double _begin[3],
+    const double _end[3])
+{
+  for (size_t index=0;index<3;++index) {
+    begin[index] = _begin[index];
+    end[index] = _end[index];
+  }
+}
+
+
+#endif /* SAMPLINGGRID_INLINE_HPP_ */
