Skip to content
Snippets Groups Projects
Commit f1089056 authored by patavirt's avatar patavirt
Browse files

tests: fix sns example

parent 71935dc7
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,12 @@ def example_sns_1d(phi, L, nx=500, ny=1, Delta0=1.0, alpha=0.0):
solver.alpha = alpha
solver.Omega[...] = 0
solver.Omega[0, :, :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[0, :, 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] = Delta0 * np.exp(-1j * phi / 2) * np.eye(2)
return solver
......@@ -46,8 +50,6 @@ def test_example_sns_1d():
F = np.sin(theta_a) * np.exp(-1j * phi / 2) + np.sin(theta_b) * np.exp(1j * phi / 2)
return sol, res, F
rF = res.F[:, :, 0, 0]
assert_allclose(rF.squeeze(), F, rtol=0, atol=5e-3 * abs(F).max())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment