diff --git a/hysop/operator/discrete/velocity_correction.py b/hysop/operator/discrete/velocity_correction.py index ffd41bf716d309871b8abbec5ca2843adf166fe0..c09104af5f9a0f59a617f738bada36ef3e5f3a1a 100755 --- a/hysop/operator/discrete/velocity_correction.py +++ b/hysop/operator/discrete/velocity_correction.py @@ -126,8 +126,7 @@ class VelocityCorrection_D(DiscreteOperator): self.req_flowrate.update(simulation) # warning : the flow rate value is divided by surf. - self.req_flowrate_val = self.req_flowrate[self.req_flowrate.name] \ - * self._inv_ds + self.req_flowrate_val = self.req_flowrate.data * self._inv_ds # Computation of the required velocity shift # for the current state self.computeCorrection() diff --git a/hysop/operator/tests/test_poisson.py b/hysop/operator/tests/test_poisson.py index 3cc2fb0391abefc6d030ffd08892c5c9f792bd24..97eb83cf7cf5dfb6f21b3ba2abe123196e1697a5 100755 --- a/hysop/operator/tests/test_poisson.py +++ b/hysop/operator/tests/test_poisson.py @@ -12,6 +12,8 @@ import numpy as np import hysop.tools.numpywrappers as npw import math from hysop.domain.subsets import SubBox +from hysop import testsenv + pi = math.pi sin = np.sin @@ -94,6 +96,7 @@ def computeRef2D(res, x, y, t): return res +@testsenv.fftw_failed def test_Poisson_Pressure_3D(): dom = pp.Box(length=LL) @@ -125,6 +128,7 @@ def test_Poisson_Pressure_3D(): poisson.finalize() +@testsenv.fftw_failed def test_Poisson3D(): dom = pp.Box(length=LL) @@ -156,6 +160,7 @@ def test_Poisson3D(): poisson.finalize() +@testsenv.fftw_failed def test_Poisson2D(): dom = pp.Box(length=[2. * pi, 2. * pi], origin=[0., 0.]) @@ -189,6 +194,7 @@ def test_Poisson2D(): poisson.finalize() +@testsenv.fftw_failed def test_Poisson3D_correction(): dom = pp.Box(length=LL) @@ -200,7 +206,7 @@ def test_Poisson3D_correction(): # Definition of the Poisson operator ref_rate = npw.zeros(3) ref_rate[0] = uinf * LL[1] * LL[2] - rate = pp.VariableParameter(data=ref_rate, name='flowrate') + rate = pp.VariableParameter(data=ref_rate) poisson = Poisson(velocity, vorticity, discretization=d3D, flowrate=rate) poisson.discretize() @@ -228,6 +234,7 @@ def test_Poisson3D_correction(): poisson.finalize() +@testsenv.fftw_failed def test_Poisson3D_projection_1(): dom = pp.Box(length=LL) @@ -262,6 +269,7 @@ def test_Poisson3D_projection_1(): poisson.finalize() +@testsenv.fftw_failed def test_Poisson3D_projection_2(): dom = pp.Box(length=LL) diff --git a/hysop/operator/tests/test_velocity_correction.py b/hysop/operator/tests/test_velocity_correction.py index a24cbb315e604897ebcc54670eff8c87af101525..7c883152045cf49aac2e72ee5bb5563b646294a7 100755 --- a/hysop/operator/tests/test_velocity_correction.py +++ b/hysop/operator/tests/test_velocity_correction.py @@ -62,7 +62,7 @@ def test_velocity_correction_3D(): ref_rate = npw.zeros(3) ref_rate[0] = uinf * box.length[1] * box.length[2] - rate = pp.VariableParameter(data=ref_rate, name='flowrate') + rate = pp.VariableParameter(data=ref_rate) op = VelocityCorrection(velo, vorti, req_flowrate=rate, discretization=topo, io_params={}) op.discretize() @@ -95,7 +95,7 @@ def test_velocity_correction_2D(): ref_rate = npw.zeros(2) ref_rate[0] = uinf * box.length[1] - rate = pp.VariableParameter(data=ref_rate, name='flowrate') + rate = pp.VariableParameter(data=ref_rate) op = VelocityCorrection(velo, vorti, req_flowrate=rate, discretization=topo) op.discretize() diff --git a/hysop/tools/profiler.py b/hysop/tools/profiler.py index abba88b8ccbc5d2c209040392997c6dfced84690..28e1f3a5c2b99ce6d255de5318f637e855e0bca6 100644 --- a/hysop/tools/profiler.py +++ b/hysop/tools/profiler.py @@ -33,7 +33,7 @@ class FProfiler(object): Usage: - >>> from hysop.tools.profiler FProfiler, ftime + >>> from hysop.tools.profiler import FProfiler, ftime >>> prof = FProfiler('some_name') >>> start = ftime() >>> # do something ... [1] @@ -41,7 +41,7 @@ class FProfiler(object): >>> # do something else ... [2] >>> prof += ftime() - start >>> # ... - >>> print prof + >>> # print prof >>> # --> display total time spent in do [1] and [2] >>> # and number of calls of prof