Hello
I want to run a simulation that requires iteration and interpolation, but I have been encountering this error, and the simulation will end after some iteration.
{
“name”: “BoundsError”,
“message”: “BoundsError: attempt to access 20×73×7 interpolate((::Vector{Float64},::Vector{Float64},::Vector{Float64}), ::Array{Float64, 3}, Gridded(Linear())) with element type Float64 at index [0.45414336821466633, 0.0, 0.6]”,
“stack”: "BoundsError: attempt to access 20×73×7 interpolate((::Vector{Float64},::Vector{Float64},::Vector{Float64}), ::Array{Float64, 3}, Gridded(Linear())) with element type Float64 at index [0.45414336821466633, 0.0, 0.6]
Stacktrace:
[1] throw_boundserror(A::Interpolations.GriddedInterpolation{Float64, 3, Array{Float64, 3}, Gridded{Linear{Throw{OnGrid}}}, Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}}, I::Tuple{Float64, Float64, Float64})
@ Base ./abstractarray.jl:737
[2] GriddedInterpolation
@ ~/.julia/packages/Interpolations/91PhN/src/gridded/indexing.jl:3 [inlined]
[3] aero_coeffs(sigma::Float64, lambda::Float64, mach::Float64, delta_1::Int64, delta_2::Int64, delta_3::Int64, delta_4::Int64, mrc::Float64, cg::Float64, s_ref::Float64, l_ref::Float64, CAB::Array{Float64, 3}, CNB::Array{Float64, 3}, CYB::Array{Float64, 3}, CLLB::Array{Float64, 3}, CLMB::Array{Float64, 3}, CLNB::Array{Float64, 3}, CNQ::Matrix{Float64}, CNAD::Matrix{Float64}, CYP::Array{Float64, 3}, CYR::Array{Float64, 3}, CLLP::Array{Float64, 3}, CLLR::Array{Float64, 3}, CLMAD::Matrix{Float64}, CLMQ::Matrix{Float64}, CLNP::Array{Float64, 3}, CLNR::Array{Float64, 3}, dCAd1::Array{Float64, 4}, dCAd2::Array{Float64, 4}, dCAd3::Array{Float64, 4}, dCAd4::Array{Float64, 4}, dCNd1::Array{Float64, 4}, dCNd2::Array{Float64, 4}, dCNd3::Array{Float64, 4}, dCNd4::Array{Float64, 4}, dCYd1::Array{Float64, 4}, dCYd2::Array{Float64, 4}, dCYd3::Array{Float64, 4}, dCYd4::Array{Float64, 4}, dCLLd1::Array{Float64, 4}, dCLLd2::Array{Float64, 4}, dCLLd3::Array{Float64, 4}, dCLLd4::Array{Float64, 4}, dCLMd1::Array{Float64, 4}, dCLMd2::Array{Float64, 4}, dCLMd3::Array{Float64, 4}, dCLMd4::Array{Float64, 4}, dCLNd1::Array{Float64, 4}, dCLNd2::Array{Float64, 4}, dCLNd3::Array{Float64, 4}, dCLNd4::Array{Float64, 4}, sigmat::Matrix{Float64}, lambdat::Matrix{Float64}, deltat::Matrix{Float64}, macht::Matrix{Float64})
@ Main ~/Desktop/Drive_Download/Reference_simulation-Goodness/Reference_simulation/aero_coeffs.jl:79
[4] Aerodynamics(constant::Constant, δ_1234::Vector{Int64}, ρ::Float64, vs::Float64, mach::Float64, p::Float64, q::Float64, r::Float64, σ::Float64, λ::Float64, σ̇::Int64, sigmat::Matrix{Float64}, deltat::Matrix{Float64}, macht::Matrix{Float64}, CAB::Array{Float64, 3}, CNB::Array{Float64, 3}, CYB::Array{Float64, 3}, CLLB::Array{Float64, 3}, CLMB::Array{Float64, 3}, CLNB::Array{Float64, 3}, CNQ::Matrix{Float64}, CNAD::Matrix{Float64}, CYP::Array{Float64, 3}, CYR::Array{Float64, 3}, CLLP::Array{Float64, 3}, CLLR::Array{Float64, 3}, CLMAD::Matrix{Float64}, CLMQ::Matrix{Float64}, CLNP::Array{Float64, 3}, CLNR::Array{Float64, 3}, dCAd1::Array{Float64, 4}, dCAd2::Array{Float64, 4}, dCAd3::Array{Float64, 4}, dCAd4::Array{Float64, 4}, dCNd1::Array{Float64, 4}, dCNd2::Array{Float64, 4}, dCNd3::Array{Float64, 4}, dCNd4::Array{Float64, 4}, dCYd1::Array{Float64, 4}, dCYd2::Array{Float64, 4}, dCYd3::Array{Float64, 4}, dCYd4::Array{Float64, 4}, dCLLd1::Array{Float64, 4}, dCLLd2::Array{Float64, 4}, dCLLd3::Array{Float64, 4}, dCLLd4::Array{Float64, 4}, dCLMd1::Array{Float64, 4}, dCLMd2::Array{Float64, 4}, dCLMd3::Array{Float64, 4}, dCLMd4::Array{Float64, 4}, dCLNd1::Array{Float64, 4}, dCLNd2::Array{Float64, 4}, dCLNd3::Array{Float64, 4}, dCLNd4::Array{Float64, 4}, lambdat::Matrix{Float64})
@ Main ~/Desktop/Drive_Download/Reference_simulation-Goodness/Reference_simulation/jl_notebook_cell_df34fa98e69747e1a8f8a730347b8e2f_X25sZmlsZQ==.jl:34
[5] EoM_Goodness(state::Matrix{Float64}, inertial::Inertial, δ::delta, constant::Constant)
@ Main ~/Desktop/Drive_Download/Reference_simulation-Goodness/Reference_simulation/jl_notebook_cell_df34fa98e69747e1a8f8a730347b8e2f_X26sZmlsZQ==.jl:125
[6] top-level scope
@ ~/Desktop/Drive_Download/Reference_simulation-Goodness/Reference_simulation/jl_notebook_cell_df34fa98e69747e1a8f8a730347b8e2f_X35sZmlsZQ==.jl:17"
}