From db721b146ee86622bbdba3b3b1efb69b3003f913 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen <pauli.t.virtanen@jyu.fi> Date: Mon, 15 Jan 2024 12:04:55 +0200 Subject: [PATCH] examples: more sensible factors of 2 in definition --- examples/bulk_j_an.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/bulk_j_an.py b/examples/bulk_j_an.py index c5b4ed5..16dfd46 100644 --- a/examples/bulk_j_an.py +++ b/examples/bulk_j_an.py @@ -33,8 +33,8 @@ def get_solver(soc_alpha, eta, L=10, h=0.5, D=1.0, n=5): dx = sol.Lx / nx dy = sol.Ly / ny - Ax = 2 * soc_alpha * np.kron(S_0, S_y) - Ay = -2 * soc_alpha * np.kron(S_0, S_x) + Ax = soc_alpha * np.kron(S_0, S_y) + Ay = -soc_alpha * np.kron(S_0, S_x) sol.Ux[...] = expm(1j * dx * Ax) sol.Uy[...] = expm(1j * dy * Ay) @@ -93,8 +93,8 @@ def j_anom(T, h, n=5, alpha_soc=0.01, perturbative=False): gm = (ww + 1j * h) / np.sqrt((ww + 1j * h) ** 2 + 1) fp = 1 / np.sqrt((ww - 1j * h) ** 2 + 1) fm = 1 / np.sqrt((ww + 1j * h) ** 2 + 1) - # XXX: check the 8*eta - Jy_an = (gp - gm) * (1 + gp * gm + fp * fm) * (-1j * alpha_soc**3) * (8 * eta) + # XXX: check factors of 2 + Jy_an = (gp - gm) * (1 + gp * gm + fp * fm) * (-1j * alpha_soc**3) * eta Jantot += pi * aa * Jy_an return Jtot, Jantot -- GitLab