Skip to content

Commit

Permalink
Enable user to specify mode_fast for LSWT
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazersmoke committed Jul 20, 2023
1 parent ede0041 commit b34bb1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SpinWaveTheory/SWTCalculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ end

delta_function_kernel = nothing

function intensity_formula(f::Function,swt::SpinWaveTheory,corr_ix::AbstractVector{Int64}; kernel::Union{Nothing,Function}, return_type = Float64, string_formula = "f(Q,ω,S{α,β}[ix_q,ix_ω])")
function intensity_formula(f::Function,swt::SpinWaveTheory,corr_ix::AbstractVector{Int64}; kernel::Union{Nothing,Function}, return_type = Float64, string_formula = "f(Q,ω,S{α,β}[ix_q,ix_ω])", mode_fast = false)
(; sys, positions_chem, s̃_mat) = swt
Nm, Ns = length(sys.dipoles), sys.Ns[1] # number of magnetic atoms and dimension of Hilbert space
Nf = sys.mode == :SUN ? Ns-1 : 1
Expand All @@ -505,7 +505,7 @@ function intensity_formula(f::Function,swt::SpinWaveTheory,corr_ix::AbstractVect
_, qmag = chemical_to_magnetic(swt, q)

swt_hamiltonian!(swt, qmag, Hmat)
bogoliubov!(disp, Vmat, Hmat, swt.energy_tol)
bogoliubov!(disp, Vmat, Hmat, swt.energy_tol, mode_fast)

for site = 1:Nm
# note that d is the chemical coordinates
Expand Down

0 comments on commit b34bb1a

Please sign in to comment.