From 3af902d85fb9f65988395f412e8045b3ba4d130d Mon Sep 17 00:00:00 2001 From: ysyapa Date: Tue, 5 Sep 2023 23:42:22 +0000 Subject: [PATCH] Index bug --- common.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.jl b/common.jl index a339b95..2e0ee9d 100644 --- a/common.jl +++ b/common.jl @@ -42,7 +42,7 @@ function ∂_1DOF(s::system{T}, k::Int, l::Int)::Complex{T} where {T<:Float} end "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" function get_k(s::system, i::CartesianIndex, dim::Int, p::Int)::Int