diff --git a/HySoP/hysop/operator/monitors/compute_forces.py b/HySoP/hysop/operator/monitors/compute_forces.py index 3268aacaf3137840f3a221f95bbbfb06882c6431..44694fdb1a7a25f8774453d6a121bbda23c6a8a8 100644 --- a/HySoP/hysop/operator/monitors/compute_forces.py +++ b/HySoP/hysop/operator/monitors/compute_forces.py @@ -134,8 +134,6 @@ class DragAndLift(Monitoring): dt = simulation.timeStep ite = simulation.currentIteration - self.force[...] = 0.0 - # Synchro of ghost points is required for fd schemes self._synchronize(self.vd.data + self.wd.data) @@ -143,6 +141,7 @@ class DragAndLift(Monitoring): # -1/(N-1) . d/dt int(x ^ w) if self._voc.isEmpty[self.topo]: self._buffer[...] = 0.0 + self.force[...] = 0.0 else: self._buffer = self._integrateOnBox(self._buffer) self.force[...] = -1. / dt * self._coeff * (self._buffer