diff --git a/hysop/numerics/fft/opencl_fft.py b/hysop/numerics/fft/opencl_fft.py
index b67149686b12dc42c9adf66c58fbb0e981992641..a064ea92978ffe7c50ac2af56d5cd8d718f323ac 100644
--- a/hysop/numerics/fft/opencl_fft.py
+++ b/hysop/numerics/fft/opencl_fft.py
@@ -141,6 +141,10 @@ class OpenClFFTI(FFTI):
             launcher += lnc
         return launcher
     
+    def plan_compute_energy(self, tg, src, dst, transforms, 
+            method='round', target=None):
+        raise NotImplementedError
+    
     @classmethod
     def ensure_buffer(cls, get_buffer):
         if callable(get_buffer):
diff --git a/hysop/operator/hdf_io.py b/hysop/operator/hdf_io.py
index dc6b5926612800b647186be6eb215c06b2b3bde6..b65eb3f000cc09936fadda14dc384ba9a296cd88 100755
--- a/hysop/operator/hdf_io.py
+++ b/hysop/operator/hdf_io.py
@@ -362,10 +362,7 @@ class HDF_Writer(HDF_IO):
     def apply(self, simulation=None, **kwds):
         if (simulation is None):
             raise ValueError("Missing simulation value for monitoring.")
-        ite = simulation.current_iteration
-        should_dump  = (self.io_params.frequency>0) and (ite % self.io_params.frequency == 0)
-        should_dump |= simulation.is_time_of_interest
-        if should_dump:
+        if simulation.should_dump(frequency=self.io_params.frequency):
             if (self._xmf_file is None):
                 self.createXMFFile()
             self.step(simulation)
diff --git a/hysop/operator/mean_field.py b/hysop/operator/mean_field.py
index ad203012eea748e50995b8d0ae7dc2423489219b..f4c2cfc805e33713c82e031886db78fde6a8364a 100644
--- a/hysop/operator/mean_field.py
+++ b/hysop/operator/mean_field.py
@@ -115,10 +115,7 @@ class ComputeMeanField(ComputationalGraphOperator):
     def apply(self, simulation, **kwds):
         if (simulation is None):
             raise ValueError("Missing simulation value for monitoring.")
-        ite = simulation.current_iteration
-        should_dump  = (self.io_params.frequency>0) and (ite % self.io_params.frequency == 0)
-        should_dump |= simulation.is_time_of_interest
-        if should_dump:
+        if simulation.should_dump(frequency=self.io_params.frequency):
             for (dfield, (view, axes)) in self.averaged_dfields.iteritems():
                 filename = self.filename(dfield, self.write_counter)
                 arrays = {}
diff --git a/hysop/operator/parameter_plotter.py b/hysop/operator/parameter_plotter.py
index 0a4b1ee4d9a79d821f0308dc008aaed0a42d494c..8a1abda648860aa6cdd03a39698c8797506efd84 100644
--- a/hysop/operator/parameter_plotter.py
+++ b/hysop/operator/parameter_plotter.py
@@ -63,23 +63,14 @@ class PlottingOperator(ComputationalGraphOperator):
         self._save(**kwds)
 
     def _update(self, simulation, **kwds):
-        if (self.update_frequency == 0):
-            return
-        self.update(simulation=simulation, **kwds)
-        if not simulation._next_is_last:
-            if (simulation.current_iteration>1) and \
-                ((simulation.current_iteration % self.update_frequency) != 0):
-                return
-        if self.should_draw:
-            self.draw()
+        if simulation.should_dump(frequency=self.update_frequency, with_last=True):
+            self.update(simulation=simulation, **kwds)
+            if self.should_draw:
+                self.draw()
 
     def _save(self, simulation, **kwds):
-        if not simulation._next_is_last:
-            if (self.save_frequency == 0): 
-                return
-            if ((simulation.current_iteration % self.save_frequency) != 0):
-                return
-        self.save(simulation=simulation, **kwds)
+        if simulation.should_dump(frequency=self.save_frequency, with_last=True):
+            self.save(simulation=simulation, **kwds)
     
     @abstractmethod
     def update(self, **kwds):
diff --git a/hysop/simulation.py b/hysop/simulation.py
index ba3f97397179207d3545a74f948134b8fb69e005..0a3183ab84595b38390716d27955ec2d3c3e8474 100644
--- a/hysop/simulation.py
+++ b/hysop/simulation.py
@@ -396,4 +396,12 @@ class Simulation(object):
         s += str(self.current_iteration) + ', max number of iterations : '
         s += str(self.max_iter)
         return s
+    
+    def should_dump(self, frequency, with_last=False):
+        dump = (with_last and self._next_is_last)
+        if (frequency >= 0):
+            dump |= self.is_time_of_interest
+        if (frequency > 0):
+            dump |= ((self.current_iteration % frequency) == 0)
+        return dump