diff --git a/examples/cfd/01_convection_revisited.ipynb b/examples/cfd/01_convection_revisited.ipynb index 0d5d405618..259a47744d 100644 --- a/examples/cfd/01_convection_revisited.ipynb +++ b/examples/cfd/01_convection_revisited.ipynb @@ -426,9 +426,9 @@ " for (int time = time_m, t0 = (time)%(2), t1 = (time + 1)%(2); time <= time_M; time += 1, t0 = (time)%(2), t1 = (time + 1)%(2))\n", " {\n", " START(section0)\n", - " for (int x = x_ltkn0 + x_m; x <= x_M - x_rtkn0; x += 1)\n", + " for (int x = x_m + x_ltkn0; x <= x_M - x_rtkn0; x += 1)\n", " {\n", - " for (int y = y_ltkn0 + y_m; y <= y_M - y_rtkn0; y += 1)\n", + " for (int y = y_m + y_ltkn0; y <= y_M - y_rtkn0; y += 1)\n", " {\n", " u[t1][x + 1][y + 1] = dt*(-(-u[t0][x][y + 1]/h_x + u[t0][x + 1][y + 1]/h_x) - (-u[t0][x + 1][y]/h_y + u[t0][x + 1][y + 1]/h_y) + u[t0][x + 1][y + 1]/dt);\n", " }\n", diff --git a/tests/test_symbolic_coefficients.py b/tests/test_symbolic_coefficients.py index 00dd80c765..30a89b155b 100644 --- a/tests/test_symbolic_coefficients.py +++ b/tests/test_symbolic_coefficients.py @@ -200,8 +200,8 @@ def test_staggered_equation(self): eq_f = Eq(f, f.dx2(weights=weights)) - expected = 'Eq(f(x + h_x/2), f(x - h_x/2) - 2.0*f(x + h_x/2)'\ - ' + f(x + 3*h_x/2))' + expected = 'Eq(f(x + h_x/2), 1.0*f(x - h_x/2) - 2.0*f(x + h_x/2)'\ + ' + 1.0*f(x + 3*h_x/2))' assert(str(eq_f.evaluate) == expected) @pytest.mark.parametrize('stagger', [True, False])