Skip to content

Commit 24b0155

Browse files
committed
Removed None backend and corrected the trig functions by adding TWO_PI
1 parent 8c914b4 commit 24b0155

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

psydac/feec/tests/test_global_projectors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ def test_derham_projector_2d_hcurl(ncells, degree, periodic, multiplicity):
220220
P0, P1, P2, PX = derham_h.projectors()
221221

222222
# Function to project
223-
f1 = lambda xi1, xi2 : np.sin( TWO_PI * (xi1 + 0.5) ) * np.cos( xi2 + 0.3 )
224-
f2 = lambda xi1, xi2 : np.cos( xi1 + 0.5 ) * np.sin( xi2 - 0.2 )
223+
f1 = lambda xi1, xi2 : np.sin( TWO_PI*(xi1 + 0.5) ) * np.cos( TWO_PI*(xi2 + 0.3) )
224+
f2 = lambda xi1, xi2 : np.cos( TWO_PI*(xi1 + 0.5) ) * np.sin( TWO_PI*(xi2 - 0.2) )
225225

226226
# Compute the projection
227227
u0 = P0(f1)

psydac/linalg/tests/test_stencil_matrix.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,8 +2147,8 @@ def test_stencil_matrix_2d_serial_backend_dot_3(dtype, n1, n2, p1, p2, s1, s2, P
21472147
@pytest.mark.parametrize('s2', [1])
21482148
@pytest.mark.parametrize('P1', [True])
21492149
@pytest.mark.parametrize('P2', [True])
2150-
@pytest.mark.parametrize('backend', [None, PSYDAC_BACKEND_PYTHON, PSYDAC_BACKEND_GPYCCEL])
2151-
@pytest.mark.parametrize('backend2', [None, PSYDAC_BACKEND_PYTHON, PSYDAC_BACKEND_GPYCCEL])
2150+
@pytest.mark.parametrize('backend', [PSYDAC_BACKEND_PYTHON, PSYDAC_BACKEND_GPYCCEL])
2151+
@pytest.mark.parametrize('backend2', [PSYDAC_BACKEND_PYTHON, PSYDAC_BACKEND_GPYCCEL])
21522152
def test_stencil_matrix_2d_serial_backend_switch(dtype, n1, n2, p1, p2, s1, s2, P1, P2, backend, backend2):
21532153
# Create domain decomposition
21542154
D = DomainDecomposition([n1 - 1, n2 - 1], periods=[P1, P2])
@@ -2180,7 +2180,7 @@ def test_stencil_matrix_2d_serial_backend_switch(dtype, n1, n2, p1, p2, s1, s2,
21802180

21812181
assert M.backend is backend
21822182
M.dot(x)
2183-
M.set_backend(backend2)
2183+
M.set_backend(backend2, precompiled=False)
21842184

21852185
assert M.backend is backend2
21862186
M.dot(x)

0 commit comments

Comments
 (0)