Skip to content

Commit

Permalink
Extend Lanczos buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
hlane33 authored and ddahlbom committed Dec 13, 2023
1 parent e69b660 commit 167f57c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/SpinWaveTheory/KPM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ function intensity_formula_kpm(f,swt::SpinWaveTheory,corr_ix::AbstractVector{Int
sqrt_Nm_inv = 1.0 / Nm #define prefactors
S = (Ns-1) / 2
sqrt_halfS = (S/2) #define prefactors
sqrt_Nm_inv = 1.0 / Nm #define prefactors
S = (Ns-1) / 2
sqrt_halfS = (S/2) #define prefactors
Ĩ = spdiagm([ones(nmodes); -ones(nmodes)])
n_iters = 50
Avec_pref = zeros(ComplexF64, Nm) # initialize array of some prefactors
Expand All @@ -285,7 +282,7 @@ function intensity_formula_kpm(f,swt::SpinWaveTheory,corr_ix::AbstractVector{Int
q_absolute = swt.sys.crystal.recipvecs * q_reshaped
u = zeros(ComplexF64,3,2*nmodes)
multiply_by_hamiltonian!(y, x) = (swt.sys.mode == :SUN) ? multiply_by_hamiltonian_SUN!(y, x, swt, q_reshaped) : multiply_by_hamiltonian_dipole!(y, x, swt, q_reshaped)
lo,hi = Sunny.eigbounds_MF(swt,q_reshaped,n_iters; extend=0.25) # calculate bounds
lo,hi = Sunny.eigbounds_MF(swt,q_reshaped,n_iters; extend=0.5) # calculate bounds
γ=max(abs(lo),abs(hi)) # select upper bound (combine with the preceeding line later)
# u(q) calculation
for site = 1:Nm
Expand Down

0 comments on commit 167f57c

Please sign in to comment.