Skip to content

Commit

Permalink
Fix broken CI/CD
Browse files Browse the repository at this point in the history
There was an overloaded meaning of S (the label for the irrep, or the
spin operators).
  • Loading branch information
kbarros committed Jul 18, 2023
1 parent 72e401b commit e05451a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/test_lswt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ end
sys_dip = System(cryst, dims, [SpinInfo(1; S=S, g=1)], :dipole; units=Units.theory)

set_exchange!(sys_dip, J, Bond(1, 1, [1, 0, 0]))
S = spin_operators(sys_dip,1)
set_onsite_coupling!(sys_dip, D*S[3]^2, 1)
Sz = spin_operators(sys_dip,1)[3]
set_onsite_coupling!(sys_dip, D*Sz^2, 1)
set_external_field!(sys_dip, [0, 0, h])
sys_swt_dip = reshape_geometry(sys_dip, [1 -1 0; 1 1 0; 0 0 1])
c₂ = 1 - 1/(2S)
Expand Down Expand Up @@ -234,8 +234,7 @@ end
s_mat = Sunny.spin_matrices(N=2S+1)


S = spin_operators(sys_dip,1)
s̃ᶻ = 𝐌[1] * S[1] + 𝐌[2] * S[2] + 𝐌[3] * S[3]
s̃ᶻ = 𝐌' * spin_operators(sys_dip,1)

U_mat = exp(-1im * ϕ * s_mat[3]) * exp(-1im * θ * s_mat[2])
hws = zeros(2S+1)
Expand All @@ -245,9 +244,7 @@ end
aniso = Ds[1]*s̃ᶻ^2 + Ds[2]*s̃ᶻ^4 + Ds[3]*s̃ᶻ^6
set_onsite_coupling!(sys_dip, aniso, 1)


S = spin_operators(sys_SUN,1)
s̃ᶻ = 𝐌[1] * S[1] + 𝐌[2] * S[2] + 𝐌[3] * S[3]
s̃ᶻ = 𝐌' * spin_operators(sys_SUN,1)
aniso = Ds[1]*s̃ᶻ^2 + Ds[2]*s̃ᶻ^4 + Ds[3]*s̃ᶻ^6
set_onsite_coupling!(sys_SUN, aniso, 1)
set_external_field!(sys_dip, h*𝐌)
Expand Down

1 comment on commit e05451a

@Lazersmoke
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

Please sign in to comment.