From 77db553d5423c9f983e9f18b453dddce3aa74b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaman=20G=C3=BC=C3=A7l=C3=BC?= Date: Wed, 16 Oct 2024 14:20:43 +0200 Subject: [PATCH 1/6] Use branch "real_coord" of SymPDE --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 032ea1dda..150e6c1b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ 'pyevtk', # Our packages from PyPi - 'sympde == 0.19.0', + 'sympde @ https://github.com/pyccel/sympde/archive/refs/heads/real_coord.zip', 'pyccel >= 1.11.2', 'gelato == 0.12', From 17b2fd08766c27a36e9da81d783a6b943e320002 Mon Sep 17 00:00:00 2001 From: elmosa Date: Fri, 29 Nov 2024 20:47:36 +0100 Subject: [PATCH 2/6] trigger tests --- psydac/api/tests/test_2d_complex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/psydac/api/tests/test_2d_complex.py b/psydac/api/tests/test_2d_complex.py index 9caf559cc..d9ce75323 100644 --- a/psydac/api/tests/test_2d_complex.py +++ b/psydac/api/tests/test_2d_complex.py @@ -229,6 +229,7 @@ def run_helmholtz_2d(solution, kappa, e_w_0, dx_e_w_0, domain, ncells=None, degr l2norm = Norm(error, domain, kind='l2') h1norm = SemiNorm(error, domain, kind='h1') + #+++++++++++++++++++++++++++++++ # 2. Discretization #+++++++++++++++++++++++++++++++ @@ -237,7 +238,6 @@ def run_helmholtz_2d(solution, kappa, e_w_0, dx_e_w_0, domain, ncells=None, degr Vh = discretize(V, domain_h, degree=degree) equation_h = discretize(equation, domain_h, [Vh, Vh], backend=backend) - l2norm_h = discretize(l2norm, domain_h, Vh, backend=backend) h1norm_h = discretize(h1norm, domain_h, Vh, backend=backend) @@ -450,7 +450,7 @@ def test_complex_helmholtz_2d(plot_sol=False): u_err = [(u1 - u2) for u1, u2 in zip(u_vals, uh_vals)] my_small_plot( - title=r'approximation of solution $u$', + title=r'Approximation of solution $u$', vals=[u_vals, uh_vals, u_err], titles=[r'$u^{ex}(x,y)$', r'$u^h(x,y)$', r'$|(u^{ex}-u^h)(x,y)|$'], xx=xx, From f3f069525246e7b27437858777437555b5f098b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Moral=20S=C3=A1nchez?= <88042165+e-moral-sanchez@users.noreply.github.com> Date: Fri, 29 Nov 2024 20:49:52 +0100 Subject: [PATCH 3/6] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 150e6c1b7..2827a28ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,6 @@ maintainers = [ keywords = ["FEM", "IGA", "B-spline", "NURBS"] classifiers = ["Programming Language :: Python :: 3"] dependencies = [ - # Third-party packages from PyPi 'numpy >= 1.16', 'scipy >= 1.12', From 2e169a6cbbb94841457f7a46478951123aa3e673 Mon Sep 17 00:00:00 2001 From: elmosa Date: Fri, 29 Nov 2024 23:20:55 +0100 Subject: [PATCH 4/6] symbols in tests must be initialized with real=True --- psydac/api/tests/test_2d_biharmonic.py | 2 +- psydac/api/tests/test_2d_complex.py | 4 ++-- psydac/api/tests/test_2d_laplace.py | 2 +- psydac/api/tests/test_2d_poisson.py | 2 +- psydac/api/tests/test_api_1d_compatible_spaces.py | 2 +- psydac/api/tests/test_api_2d_compatible_spaces.py | 4 ++-- psydac/api/tests/test_api_2d_system.py | 2 +- psydac/api/tests/test_api_2d_vector.py | 2 +- psydac/api/tests/test_api_3d_scalar.py | 10 +++++----- psydac/api/tests/test_api_3d_vector.py | 2 +- psydac/api/tests/test_api_feec_2d.py | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/psydac/api/tests/test_2d_biharmonic.py b/psydac/api/tests/test_2d_biharmonic.py index 7a15bd7c3..219754ba4 100644 --- a/psydac/api/tests/test_2d_biharmonic.py +++ b/psydac/api/tests/test_2d_biharmonic.py @@ -18,7 +18,7 @@ from psydac.api.discretization import discretize -x,y,z = symbols('x1, x2, x3') +x,y,z = symbols('x1, x2, x3', real=True) #============================================================================== def get_boundaries(*args): diff --git a/psydac/api/tests/test_2d_complex.py b/psydac/api/tests/test_2d_complex.py index d9ce75323..1224a5467 100644 --- a/psydac/api/tests/test_2d_complex.py +++ b/psydac/api/tests/test_2d_complex.py @@ -322,7 +322,7 @@ def run_maxwell_2d(uex, f, alpha, domain, *, ncells=None, degree=None, filename= ############################################################################### def test_complex_biharmonic_2d(): # This test solve the biharmonic problem with homogeneous dirichlet condition without a mapping - x, y, z = symbols('x1, x2, x3') + x, y, z = symbols('x1, x2, x3', real=True) solution = (sin(pi * x)**2 * sin(pi * y)**2 + 1j * sin(2*pi * x)**2 * sin(2*pi * y)**2) * exp(pi * 1j * (x**2+y**2)) f = laplace(laplace(solution)) @@ -343,7 +343,7 @@ def test_complex_biharmonic_2d(): def test_complex_biharmonic_2d_mapping(): # This test solve the biharmonic problem with homogeneous dirichlet condition with a mapping - x, y, z = symbols('x, y, z') + x, y, z = symbols('x, y, z', real=True) filename = os.path.join(mesh_dir, 'collela_2d.h5') factor=2.5 diff --git a/psydac/api/tests/test_2d_laplace.py b/psydac/api/tests/test_2d_laplace.py index 1a7b781e3..4ab808a00 100644 --- a/psydac/api/tests/test_2d_laplace.py +++ b/psydac/api/tests/test_2d_laplace.py @@ -18,7 +18,7 @@ from psydac.api.discretization import discretize -x,y,z = symbols('x1, x2, x3') +x,y,z = symbols('x1, x2, x3', real=True) #============================================================================== def get_boundaries(*args): diff --git a/psydac/api/tests/test_2d_poisson.py b/psydac/api/tests/test_2d_poisson.py index 59538a158..ab16e6d10 100644 --- a/psydac/api/tests/test_2d_poisson.py +++ b/psydac/api/tests/test_2d_poisson.py @@ -19,7 +19,7 @@ from psydac.api.discretization import discretize from psydac.api.settings import PSYDAC_BACKEND_GPYCCEL -x,y,z = symbols('x1, x2, x3') +x,y,z = symbols('x1, x2, x3', real=True) # backend to activate multi threading PSYDAC_BACKEND_GPYCCEL_WITH_OPENMP = PSYDAC_BACKEND_GPYCCEL.copy() diff --git a/psydac/api/tests/test_api_1d_compatible_spaces.py b/psydac/api/tests/test_api_1d_compatible_spaces.py index 67347b827..f2d007762 100644 --- a/psydac/api/tests/test_api_1d_compatible_spaces.py +++ b/psydac/api/tests/test_api_1d_compatible_spaces.py @@ -81,7 +81,7 @@ def run_system_1_1d_dir(f0, sol, ncells, degree): def test_api_system_1_1d_dir_1(): from sympy import symbols - x1 = symbols('x1') + x1 = symbols('x1', real=True) f0 = -(2*pi)**2*sin(2*pi*x1) u = sin(2*pi*x1) diff --git a/psydac/api/tests/test_api_2d_compatible_spaces.py b/psydac/api/tests/test_api_2d_compatible_spaces.py index 45c04a943..e7df37e38 100644 --- a/psydac/api/tests/test_api_2d_compatible_spaces.py +++ b/psydac/api/tests/test_api_2d_compatible_spaces.py @@ -413,7 +413,7 @@ def run_maxwell_time_harmonic_2d_dir(uex, f, alpha, ncells, degree): ############################################################################### def test_poisson_mixed_form_2d_dir_1(): from sympy import symbols - x1, x2 = symbols('x1, x2') + x1, x2 = symbols('x1, x2', real=True) f0 = -2*x1*(1-x1) -2*x2*(1-x2) u = x1*(1-x1)*x2*(1-x2) @@ -509,7 +509,7 @@ def test_stokes_2d_dir_non_homogeneous(scipy): #------------------------------------------------------------------------------ def test_maxwell_time_harmonic_2d_dir_1(): from sympy import symbols - x,y,z = symbols('x1, x2, x3') + x,y,z = symbols('x1, x2, x3', real=True) alpha = 1. uex = Tuple(sin(pi*y), sin(pi*x)*cos(pi*y)) diff --git a/psydac/api/tests/test_api_2d_system.py b/psydac/api/tests/test_api_2d_system.py index a1bc48c38..a4d356b9b 100644 --- a/psydac/api/tests/test_api_2d_system.py +++ b/psydac/api/tests/test_api_2d_system.py @@ -127,7 +127,7 @@ def test_api_system_1_2d_dir_1(): from sympy import symbols - x1,x2 = symbols('x1, x2') + x1,x2 = symbols('x1, x2', real=True) Fe = Tuple(sin(pi*x1)*sin(pi*x2), sin(pi*x1)*sin(pi*x2)) f0 = Tuple(2*pi**2*sin(pi*x1)*sin(pi*x2), diff --git a/psydac/api/tests/test_api_2d_vector.py b/psydac/api/tests/test_api_2d_vector.py index 7b8449b87..b18c94a39 100644 --- a/psydac/api/tests/test_api_2d_vector.py +++ b/psydac/api/tests/test_api_2d_vector.py @@ -74,7 +74,7 @@ def run_vector_poisson_2d_dir(solution, f, ncells, degree): def test_api_vector_poisson_2d_dir_1(): from sympy import symbols - x1, x2 = symbols('x1, x2') + x1, x2 = symbols('x1, x2', real=True) u1 = sin(pi*x1)*sin(pi*x2) u2 = sin(pi*x1)*sin(pi*x2) diff --git a/psydac/api/tests/test_api_3d_scalar.py b/psydac/api/tests/test_api_3d_scalar.py index 6760b4352..668a7f674 100644 --- a/psydac/api/tests/test_api_3d_scalar.py +++ b/psydac/api/tests/test_api_3d_scalar.py @@ -159,7 +159,7 @@ def run_poisson_3d_dirneu(solution, f, boundary, ncells, degree, comm=None): def test_api_poisson_3d_dir_1(): from sympy import symbols - x1, x2, x3 = symbols('x1, x2, x3') + x1, x2, x3 = symbols('x1, x2, x3', real=True) solution = sin(pi*x1)*sin(pi*x2)*sin(pi*x3) f = 3*pi**2*sin(pi*x1)*sin(pi*x2)*sin(pi*x3) @@ -194,7 +194,7 @@ def test_api_poisson_3d_dir_1(): def test_api_poisson_3d_dirneu_2(): from sympy import symbols - x1, x2, x3 = symbols('x1, x2, x3') + x1, x2, x3 = symbols('x1, x2, x3', real=True) solution = sin(0.5*pi*x1)*sin(pi*x2)*sin(pi*x3) f = (9./4.)*pi**2*solution @@ -212,7 +212,7 @@ def test_api_poisson_3d_dirneu_2(): def test_api_poisson_3d_dirneu_13(): from sympy import symbols - x1, x2, x3 = symbols('x1, x2, x3') + x1, x2, x3 = symbols('x1, x2, x3', real=True) solution = cos(0.5*pi*x1)*cos(0.5*pi*x2)*sin(pi*x3) f = (3./2.)*pi**2*solution @@ -232,7 +232,7 @@ def test_api_poisson_3d_dirneu_13(): def test_api_poisson_3d_dirneu_24(): from sympy import symbols - x1, x2, x3 = symbols('x1, x2, x3') + x1, x2, x3 = symbols('x1, x2, x3', real=True) solution = sin(0.5*pi*x1)*sin(0.5*pi*x2)*sin(pi*x3) f = (3./2.)*pi**2*solution @@ -300,7 +300,7 @@ def test_api_poisson_3d_dirneu_24(): def test_api_poisson_3d_dir_1_parallel(): from sympy import symbols - x1, x2, x3 = symbols('x1, x2, x3') + x1, x2, x3 = symbols('x1, x2, x3', real=True) solution = sin(pi*x1)*sin(pi*x2)*sin(pi*x3) f = 3*pi**2*sin(pi*x1)*sin(pi*x2)*sin(pi*x3) diff --git a/psydac/api/tests/test_api_3d_vector.py b/psydac/api/tests/test_api_3d_vector.py index f2171a37d..dc55df754 100644 --- a/psydac/api/tests/test_api_3d_vector.py +++ b/psydac/api/tests/test_api_3d_vector.py @@ -74,7 +74,7 @@ def run_vector_poisson_3d_dir(solution, f, ncells, degree): def test_api_vector_poisson_3d_dir_1(): from sympy import symbols - x1, x2, x3 = symbols('x1, x2, x3') + x1, x2, x3 = symbols('x1, x2, x3', real=True) u1 = sin(pi*x1)*sin(pi*x2)*sin(pi*x3) u2 = sin(pi*x1)*sin(pi*x2)*sin(pi*x3) diff --git a/psydac/api/tests/test_api_feec_2d.py b/psydac/api/tests/test_api_feec_2d.py index 59d4b9834..ac32d1fcd 100644 --- a/psydac/api/tests/test_api_feec_2d.py +++ b/psydac/api/tests/test_api_feec_2d.py @@ -59,7 +59,7 @@ def __init__(self, *, a, b, c, nx, ny): params = {'a': a, 'b': b, 'c': c, 'nx': nx, 'ny': ny} repl = [(sym_params[k], params[k]) for k in sym_params.keys()] - args = symbols('t, x, y') + args = symbols('t, x, y', real=True) # Callable functions fields = {k: lambdify(args , v.subs(repl), 'numpy') for k, v in sym_fields.items()} From dc64c7718d71027821f5111a9002168d0c88a91e Mon Sep 17 00:00:00 2001 From: elmosa Date: Sat, 30 Nov 2024 00:46:23 +0100 Subject: [PATCH 5/6] dont import symbols from sympy --- psydac/api/tests/test_2d_mapping_biharmonic.py | 3 ++- psydac/api/tests/test_2d_mapping_laplace.py | 3 ++- psydac/api/tests/test_2d_mapping_poisson.py | 3 ++- psydac/api/tests/test_api_2d_fields.py | 4 ++-- psydac/api/tests/test_api_2d_vector_mapping.py | 7 ++----- psydac/api/tests/test_api_2d_vector_multipatch_mapping.py | 4 ++-- psydac/api/tests/test_api_3d_scalar_mapping.py | 6 +++--- psydac/api/tests/test_api_3d_vector_mapping.py | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/psydac/api/tests/test_2d_mapping_biharmonic.py b/psydac/api/tests/test_2d_mapping_biharmonic.py index cd4df2c3e..14550f9fb 100644 --- a/psydac/api/tests/test_2d_mapping_biharmonic.py +++ b/psydac/api/tests/test_2d_mapping_biharmonic.py @@ -16,7 +16,6 @@ from mpi4py import MPI from sympy import pi, cos, sin, symbols -from sympy.abc import x, y import pytest import os import numpy as np @@ -43,6 +42,8 @@ base_dir = os.path.join(base_dir, '..', '..', '..') mesh_dir = os.path.join(base_dir, 'mesh') # ... +x,y = symbols('x,y', real=True) + #============================================================================== def get_boundaries(*args): diff --git a/psydac/api/tests/test_2d_mapping_laplace.py b/psydac/api/tests/test_2d_mapping_laplace.py index 616bcf6b6..ea156803c 100644 --- a/psydac/api/tests/test_2d_mapping_laplace.py +++ b/psydac/api/tests/test_2d_mapping_laplace.py @@ -16,7 +16,6 @@ from mpi4py import MPI from sympy import pi, cos, sin, symbols -from sympy.abc import x, y import pytest import os import numpy as np @@ -43,6 +42,8 @@ base_dir = os.path.join(base_dir, '..', '..', '..') mesh_dir = os.path.join(base_dir, 'mesh') # ... +x,y = symbols('x,y', real=True) + #============================================================================== def get_boundaries(*args): diff --git a/psydac/api/tests/test_2d_mapping_poisson.py b/psydac/api/tests/test_2d_mapping_poisson.py index 5a4c0ccbd..f60d619cb 100644 --- a/psydac/api/tests/test_2d_mapping_poisson.py +++ b/psydac/api/tests/test_2d_mapping_poisson.py @@ -17,7 +17,6 @@ import os from mpi4py import MPI from sympy import pi, cos, sin, symbols -from sympy.abc import x, y import pytest import numpy as np @@ -44,6 +43,8 @@ base_dir = os.path.join(base_dir, '..', '..', '..') mesh_dir = os.path.join(base_dir, 'mesh') +x, y = symbols('x, y', real=True) + # backend to activate multi threading PSYDAC_BACKEND_GPYCCEL_WITH_OPENMP = PSYDAC_BACKEND_GPYCCEL.copy() PSYDAC_BACKEND_GPYCCEL_WITH_OPENMP['openmp'] = True diff --git a/psydac/api/tests/test_api_2d_fields.py b/psydac/api/tests/test_api_2d_fields.py index 89f822ef6..9be6c9e1c 100644 --- a/psydac/api/tests/test_api_2d_fields.py +++ b/psydac/api/tests/test_api_2d_fields.py @@ -15,8 +15,7 @@ # coordinates (r, theta), but with reversed order: hence x1=theta and x2=r from mpi4py import MPI -from sympy import pi, cos, sin, log, exp, lambdify -from sympy.abc import x, y +from sympy import pi, cos, sin, log, exp, lambdify, symbols import pytest import os @@ -46,6 +45,7 @@ base_dir = os.path.join(base_dir, '..', '..', '..') mesh_dir = os.path.join(base_dir, 'mesh') # ... +x, y = symbols('x, y', real=True) #------------------------------------------------------------------------------ def run_field_test(filename, f): diff --git a/psydac/api/tests/test_api_2d_vector_mapping.py b/psydac/api/tests/test_api_2d_vector_mapping.py index 69c308cfb..d685d7fb4 100644 --- a/psydac/api/tests/test_api_2d_vector_mapping.py +++ b/psydac/api/tests/test_api_2d_vector_mapping.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- import os -from sympy import Tuple, Matrix +from sympy import Tuple, Matrix, symbols from sympy import pi, sin from sympde.calculus import grad, dot, inner @@ -24,6 +24,7 @@ base_dir = os.path.join(base_dir, '..', '..', '..') mesh_dir = os.path.join(base_dir, 'mesh') # ... +x,y = symbols('x,y', real=True) #============================================================================== def run_vector_poisson_2d_dir(filename, solution, f): @@ -86,8 +87,6 @@ def run_vector_poisson_2d_dir(filename, solution, f): def test_api_vector_poisson_2d_dir_identity(): filename = os.path.join(mesh_dir, 'identity_2d.h5') - from sympy.abc import x,y - u1 = sin(pi*x)*sin(pi*y) u2 = sin(pi*x)*sin(pi*y) solution = Tuple(u1, u2) @@ -108,8 +107,6 @@ def test_api_vector_poisson_2d_dir_identity(): def test_api_vector_poisson_2d_dir_collela(): filename = os.path.join(mesh_dir, 'collela_2d.h5') - from sympy.abc import x,y - u1 = sin(pi*x)*sin(pi*y) u2 = sin(pi*x)*sin(pi*y) solution = Tuple(u1, u2) diff --git a/psydac/api/tests/test_api_2d_vector_multipatch_mapping.py b/psydac/api/tests/test_api_2d_vector_multipatch_mapping.py index 5188de2a7..a0ea5ba2b 100644 --- a/psydac/api/tests/test_api_2d_vector_multipatch_mapping.py +++ b/psydac/api/tests/test_api_2d_vector_multipatch_mapping.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- import os -from sympy import Tuple, Matrix +from sympy import Tuple, Matrix, symbols from sympy import pi, sin from sympde.calculus import grad, dot, inner, Transpose @@ -101,7 +101,7 @@ def run_vector_poisson_2d_dir(filename, solution, f): def test_api_vector_poisson_2d_dir_identity(): filename = os.path.join(mesh_dir, 'multipatch/square.h5') - from sympy.abc import x,y + x,y = symbols('x,y', real=True) u1 = sin(pi*x)*sin(pi*y) u2 = sin(pi*x)*sin(pi*y) diff --git a/psydac/api/tests/test_api_3d_scalar_mapping.py b/psydac/api/tests/test_api_3d_scalar_mapping.py index 2aa9e9219..bdb3a4198 100644 --- a/psydac/api/tests/test_api_3d_scalar_mapping.py +++ b/psydac/api/tests/test_api_3d_scalar_mapping.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- from mpi4py import MPI -from sympy import pi, cos, sin +from sympy import pi, cos, sin, symbols import pytest import os @@ -240,7 +240,7 @@ def test_api_poisson_3d_dir_collela(): filename = os.path.join(mesh_dir, 'collela_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = sin(pi*x)*sin(pi*y)*sin(pi*z) f = 3*pi**2*sin(pi*x)*sin(pi*y)*sin(pi*z) @@ -258,7 +258,7 @@ def test_api_poisson_3d_dir_collela(): def test_api_poisson_3d_dirneu_identity_2(): filename = os.path.join(mesh_dir, 'identity_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = sin(0.5*pi*x)*sin(pi*y)*sin(pi*z) f = (9./4.)*pi**2*solution diff --git a/psydac/api/tests/test_api_3d_vector_mapping.py b/psydac/api/tests/test_api_3d_vector_mapping.py index 706070e28..2889392c4 100644 --- a/psydac/api/tests/test_api_3d_vector_mapping.py +++ b/psydac/api/tests/test_api_3d_vector_mapping.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 -*- import os -from sympy import Tuple, Matrix +from sympy import Tuple, Matrix, symbols from sympy import pi, sin from sympde.calculus import grad, dot, inner @@ -85,7 +85,7 @@ def run_vector_poisson_3d_dir(filename, solution, f): def test_api_vector_poisson_3d_dir_identity(): filename = os.path.join(mesh_dir, 'identity_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) u1 = sin(pi*x)*sin(pi*y)*sin(pi*z) u2 = sin(pi*x)*sin(pi*y)*sin(pi*z) @@ -109,7 +109,7 @@ def test_api_vector_poisson_3d_dir_identity(): def test_api_vector_poisson_3d_dir_collela(): filename = os.path.join(mesh_dir, 'collela_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) u1 = sin(pi*x)*sin(pi*y)*sin(pi*z) u2 = sin(pi*x)*sin(pi*y)*sin(pi*z) From cd32674e9ac8ae80cd54941f7bf3cd4e55f98e7b Mon Sep 17 00:00:00 2001 From: elmosa Date: Mon, 2 Dec 2024 10:22:21 +0100 Subject: [PATCH 6/6] fix tests --- psydac/api/tests/test_api_3d_scalar_mapping.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/psydac/api/tests/test_api_3d_scalar_mapping.py b/psydac/api/tests/test_api_3d_scalar_mapping.py index bdb3a4198..0d51db13b 100644 --- a/psydac/api/tests/test_api_3d_scalar_mapping.py +++ b/psydac/api/tests/test_api_3d_scalar_mapping.py @@ -276,7 +276,7 @@ def test_api_poisson_3d_dirneu_identity_2(): def test_api_poisson_3d_dirneu_identity_13(): filename = os.path.join(mesh_dir, 'identity_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = cos(0.5*pi*x)*cos(0.5*pi*y)*sin(pi*z) f = (3./2.)*pi**2*solution @@ -295,7 +295,7 @@ def test_api_poisson_3d_dirneu_identity_13(): def test_api_poisson_3d_dirneu_identity_24(): filename = os.path.join(mesh_dir, 'identity_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = sin(0.5*pi*x)*sin(0.5*pi*y)*sin(pi*z) f = (3./2.)*pi**2*solution @@ -358,7 +358,7 @@ def test_api_poisson_3d_dirneu_identity_24(): def test_api_poisson_3d_dirneu_collela_2(): filename = os.path.join(mesh_dir, 'collela_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = sin(0.25*pi*(x+1.))*sin(pi*y)*sin(pi*z) f = (33./16.)*pi**2*solution @@ -397,7 +397,7 @@ def test_api_poisson_3d_dirneu_collela_2(): def test_api_poisson_3d_dirneu_collela_24(): filename = os.path.join(mesh_dir, 'collela_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = sin(0.25*pi*(x+1.))*sin(0.25*pi*(y+1.))*sin(pi*z) f = (9./8.)*pi**2*solution @@ -459,7 +459,7 @@ def test_api_poisson_3d_dirneu_collela_24(): def test_api_laplace_3d_neu_identity(): filename = os.path.join(mesh_dir, 'identity_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = cos(pi*x)*cos(pi*y)*cos(pi*z) f = (3.*pi**2 + 1.)*solution @@ -500,7 +500,7 @@ def test_api_poisson_3d_dir_collela(): filename = os.path.join(mesh_dir, 'collela_3d.h5') - from sympy.abc import x,y,z + x,y,z = symbols('x,y,z', real=True) solution = sin(pi*x)*sin(pi*y)*sin(pi*z) f = 3*pi**2*sin(pi*x)*sin(pi*y)*sin(pi*z)