diff --git a/tests/test_basic.py b/tests/test_basic.py index 21ef438096f9883b521af4f11eb659ff7ddc762f..3dcc8f78ea2e728a1e1e031644c226b08358c8c5 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -16,7 +16,7 @@ def basic_setup(terminals=False, nx=15, ny=5): Delta[2:, :2] = np.eye(2) s = usadelndsoc.solver.Solver(nx=nx, ny=ny) - s.Omega[...] = Delta + s.Omega[...] = 1j * Delta s.alpha = 0.0 s.Lx = 10 s.Ly = 10 @@ -48,7 +48,7 @@ def test_result_S_J0(): res = s.solve_many(omega=0.5 + 0.8j) S = res.S - vol = s.Lx * s.Ly / (s.shape[0] * s.shape[1]) + vol = s.Lx * s.Ly / (s.shape[0] * s.shape[1]) * 4j assert_allclose(S[:, :, :2, :2], vol * res.G) assert_allclose(S[:, :, :2, 2:], vol * res.F) diff --git a/tests/test_solver.py b/tests/test_solver.py index 9f477cc56415768c71c327cc19f1567aaac869b3..f478a73dcde303fdaf40280ba9487b16d96d1b75 100644 --- a/tests/test_solver.py +++ b/tests/test_solver.py @@ -9,6 +9,7 @@ from usadelndsoc.solver import * from usadelndsoc.bcs import BCS_Delta try: + raise ImportError() import usadel1 except ImportError: usadel1 = None @@ -25,15 +26,16 @@ def example_sns_1d(phi, L, nx=500, ny=1, Delta0=1.0, alpha=0.0): solver.Omega[...] = 0 - solver.Omega[0, :, :2, 2:] = Delta0 * np.exp(-1j * phi / 2) * np.eye(2) - solver.Omega[0, :, 2:, :2] = Delta0 * np.exp(+1j * phi / 2) * np.eye(2) + solver.Omega[0, :, :2, 2:] = 1j * Delta0 * np.exp(-1j * phi / 2) * np.eye(2) + solver.Omega[0, :, 2:, :2] = 1j * Delta0 * np.exp(+1j * phi / 2) * np.eye(2) - solver.Omega[-1, :, :2, 2:] = Delta0 * np.exp(+1j * phi / 2) * np.eye(2) - solver.Omega[-1, :, 2:, :2] = Delta0 * np.exp(-1j * phi / 2) * np.eye(2) + solver.Omega[-1, :, :2, 2:] = 1j * Delta0 * np.exp(+1j * phi / 2) * np.eye(2) + solver.Omega[-1, :, 2:, :2] = 1j * Delta0 * np.exp(-1j * phi / 2) * np.eye(2) return solver +@pytest.mark.slow def test_example_sns_1d(): # Test against analytic solution omega = 30