diff --git a/HySoP/hysop/operator/analytic.py b/HySoP/hysop/operator/analytic.py index 7536a27c66c526405df963cabd0fbbc08888baec..45a9e77f82a3d6f5e366f5e3c1ebbe283abc5d19 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 a1c30c3297ec598a310fc2af4b5792e609e9b106..7d8abc469c915bd9433f764193227b5442751c9b 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()