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

tests: test self-consistency with h

parent 50c35bfe
No related branches found
No related tags found
No related merge requests found
......@@ -347,3 +347,23 @@ def test_soc_analytic(T, n, alpha_soc):
Js.append(J)
Jans.append(Jy_an)
def test_selfcons_h():
T = 0.4
h = 0.5
solver = Solver(nx=5, ny=2)
solver.mask[...] = MASK_NONE
solver.Lx = 5
solver.Ly = 5
solver.eta = 0
solver.Delta[...] = 1.0
solver.Omega[...] += h * np.kron(S_z, S_y)
T_c0 = np.exp(np.euler_gamma) / np.pi
Delta, I0, _, success = solver.self_consistency(T=T, T_c0=T_c0, workers=1)
Delta0 = BCS_Delta(T, T_c0, h=h)
Deltam = np.broadcast_to((Delta0 * S_0)[None, None, :, :], Delta.shape)
assert_allclose(Delta.copy(), Deltam, rtol=1e-3)
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