Index bug
This commit is contained in:
parent
bc8b026d4d
commit
3af902d85f
|
|
@ -42,7 +42,7 @@ function ∂_1DOF(s::system{T}, k::Int, l::Int)::Complex{T} where {T<:Float}
|
||||||
end
|
end
|
||||||
|
|
||||||
"Which index (dimension of the multidimensional array) corresponds to spatial dimension 'dim' and particle 'p'?"
|
"Which index (dimension of the multidimensional array) corresponds to spatial dimension 'dim' and particle 'p'?"
|
||||||
which_index(s::system, dim::Int, p::Int)::Int = p == 1 ? 1 : (dim - 1) * (s.n - 2) + p + 1
|
which_index(s::system, dim::Int, p::Int)::Int = p == 1 ? 1 : (dim - 1) * (s.n - 2) + p
|
||||||
|
|
||||||
"Δk (distance in terms of lattice paramter) between two particles along the given dimension"
|
"Δk (distance in terms of lattice paramter) between two particles along the given dimension"
|
||||||
function get_k(s::system, i::CartesianIndex, dim::Int, p::Int)::Int
|
function get_k(s::system, i::CartesianIndex, dim::Int, p::Int)::Int
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue