From b1d66b8641d039c8b7afd5fcd4c1c49ee891ade0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franck=20P=C3=A9rignon?= <franck.perignon@imag.fr>
Date: Fri, 24 May 2013 15:25:26 +0000
Subject: [PATCH] fix again ...

---
 HySoP/hysop/operator/analytic.py | 6 ++++--
 HySoP/hysop/problem/problem.py   | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/HySoP/hysop/operator/analytic.py b/HySoP/hysop/operator/analytic.py
index 7536a27c6..45a9e77f8 100644
--- a/HySoP/hysop/operator/analytic.py
+++ b/HySoP/hysop/operator/analytic.py
@@ -15,7 +15,7 @@ class Analytic(Operator):
 
     @debug
     def __init__(self, variables, resolutions, formula=None, method=None,
-                 **other_config):
+                 ghosts=None, **other_config):
         """
         Create an operator using an analytic formula to compute field(s).
         @param formula : the formula to be applied
@@ -45,6 +45,7 @@ class Analytic(Operator):
         self.resolutions = resolutions
         self.config = other_config
         self.output = self.variables
+        self.ghosts = ghosts
 
     @debug
     def setUp(self):
@@ -56,7 +57,8 @@ class Analytic(Operator):
         for v in self.variables:
             # the topology for v ...
             topo = self.domain.getOrCreateTopology(self.domain.dimension,
-                                                   self.resolutions[v])
+                                                   self.resolutions[v],
+                                                   ghosts=self.ghosts)
             # ... and the corresponding discrete field
             self.discreteFields[v] = v.discretize(topo)
 
diff --git a/HySoP/hysop/problem/problem.py b/HySoP/hysop/problem/problem.py
index a1c30c329..7d8abc469 100644
--- a/HySoP/hysop/problem/problem.py
+++ b/HySoP/hysop/problem/problem.py
@@ -148,8 +148,9 @@ class Problem(object):
                 self.simulation.printState()
                 for op in self.operators:
                     op.apply(self.simulation)
+                testdump = \
+                    self.simulation.currentIteration % self.dumpFreq is 0
                 self.simulation.advance()
-                testdump = self.simulation.currentIteration % self.dumpFreq
                 if self._doDump and testdump:
                     self.dump()
 
-- 
GitLab