Caltech-OCTO / Subzero.jl

Native Julia Discrete Element Sea Ice Model
MIT License
7 stars 1 forks source link

Status indexing bug #70

Closed skygering closed 1 year ago

skygering commented 1 year ago
ERROR: LoadError: BoundsError: attempt to access 1101-element Vector{Subzero.Status} at index [1298]
Stacktrace:
 [1] getindex
   @ ./essentials.jl:13 [inlined]
 [2] timestep_collisions!(floes::StructArrays.StructVector{Floe{Float64}, NamedTuple{(:centroid, :coords, :height, :area, :mass, :rmax, :moment, :angles, :mc_x, :mc_y, :α, :u, :v, :ξ, :status, :id, :ghost_id, :parent_ids, :ghosts, :fxOA, :fyOA, :trqOA, :hflx_factor, :overarea, :collision_force, :collision_trq, :interactions, :stress, :stress_history, :strain, :p_dxdt, :p_dydt, :p_dudt, :p_dvdt, :p_dξdt, :p_dαdt), Tuple{Vector{Vector{Float64}}, Vector{Vector{Vector{Vector{Float64}}}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Subzero.Status}, Vector{Int64}, Vector{Int64}, Vector{Vector{Int64}}, Vector{Vector{Int64}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{Float64}, Vector{Matrix{Float64}}, Vector{Matrix{Float64}}, Vector{Subzero.StressCircularBuffer{Float64}}, Vector{Matrix{Float64}}, Vararg{Vector{Float64}, 6}}}, Int64}, n_init_floes::Int64, domain::Domain{Float64, CompressionBoundary{North, Float64}, CompressionBoundary{South, Float64}, CollisionBoundary{East, Float64}, CollisionBoundary{West, Float64}}, consts::Constants{Float64}, Δt::Int64, collision_settings::CollisionSettings{Float64}, spinlock::Base.Threads.SpinLock)
   @ Subzero ~/.julia/packages/Subzero/PocJf/src/physical_processes/collisions.jl:872
 [3] timestep_sim!(sim::Simulation{Float64, RegRectilinearGrid{Float64}, Domain{Float64, CompressionBoundary{North, Float64}, CompressionBoundary{South, Float64}, CollisionBoundary{East, Float64}, CollisionBoundary{West, Float64}}, HiblerYieldCurve{Float64}, Random.Xoshiro, StructArrays.StructVector{InitialStateOutputWriter, NamedTuple{(:filepath, :overwrite), Tuple{Vector{String}, Vector{Bool}}}, Int64}, StructArrays.StructVector{FloeOutputWriter, NamedTuple{(:outputs, :Δtout, :filepath, :overwrite), Tuple{Vector{Vector{Symbol}}, Vector{Int64}, Vector{String}, Vector{Bool}}}, Int64}, StructArrays.StructVector{GridOutputWriter, NamedTuple{(:outputs, :Δtout, :filepath, :overwrite, :xg, :yg, :data, :average), Tuple{Vector{Vector{Symbol}}, Vector{Int64}, Vector{String}, Vector{Bool}, Vector{Vector{FT} where FT<:AbstractFloat}, Vector{Vector{FT} where FT<:AbstractFloat}, Vector{Array{FT, 3} where FT<:AbstractFloat}, Vector{Bool}}}, Int64}, StructArrays.StructVector{CheckpointOutputWriter, NamedTuple{(:Δtout, :filepath, :overwrite), Tuple{Vector{Int64}, Vector{String}, Vector{Bool}}}, Int64}}, tstep::Int64)
   @ Subzero ~/.julia/packages/Subzero/PocJf/src/simulation.jl:104
 [4] run!(sim::Simulation{Float64, RegRectilinearGrid{Float64}, Domain{Float64, CompressionBoundary{North, Float64}, CompressionBoundary{South, Float64}, CollisionBoundary{East, Float64}, CollisionBoundary{West, Float64}}, HiblerYieldCurve{Float64}, Random.Xoshiro, StructArrays.StructVector{InitialStateOutputWriter, NamedTuple{(:filepath, :overwrite), Tuple{Vector{String}, Vector{Bool}}}, Int64}, StructArrays.StructVector{FloeOutputWriter, NamedTuple{(:outputs, :Δtout, :filepath, :overwrite), Tuple{Vector{Vector{Symbol}}, Vector{Int64}, Vector{String}, Vector{Bool}}}, Int64}, StructArrays.StructVector{GridOutputWriter, NamedTuple{(:outputs, :Δtout, :filepath, :overwrite, :xg, :yg, :data, :average), Tuple{Vector{Vector{Symbol}}, Vector{Int64}, Vector{String}, Vector{Bool}, Vector{Vector{FT} where FT<:AbstractFloat}, Vector{Vector{FT} where FT<:AbstractFloat}, Vector{Array{FT, 3} where FT<:AbstractFloat}, Vector{Bool}}}, Int64}, StructArrays.StructVector{CheckpointOutputWriter, NamedTuple{(:Δtout, :filepath, :overwrite), Tuple{Vector{Int64}, Vector{String}, Vector{Bool}}}, Int64}}; logger::Nothing, messages_per_tstep::Int64)
   @ Subzero ~/.julia/packages/Subzero/PocJf/src/simulation.jl:245
 [5] run!(sim::Simulation{Float64, RegRectilinearGrid{Float64}, Domain{Float64, CompressionBoundary{North, Float64}, CompressionBoundary{South, Float64}, CollisionBoundary{East, Float64}, CollisionBoundary{West, Float64}}, HiblerYieldCurve{Float64}, Random.Xoshiro, StructArrays.StructVector{InitialStateOutputWriter, NamedTuple{(:filepath, :overwrite), Tuple{Vector{String}, Vector{Bool}}}, Int64}, StructArrays.StructVector{FloeOutputWriter, NamedTuple{(:outputs, :Δtout, :filepath, :overwrite), Tuple{Vector{Vector{Symbol}}, Vector{Int64}, Vector{String}, Vector{Bool}}}, Int64}, StructArrays.StructVector{GridOutputWriter, NamedTuple{(:outputs, :Δtout, :filepath, :overwrite, :xg, :yg, :data, :average), Tuple{Vector{Vector{Symbol}}, Vector{Int64}, Vector{String}, Vector{Bool}, Vector{Vector{FT} where FT<:AbstractFloat}, Vector{Vector{FT} where FT<:AbstractFloat}, Vector{Array{FT, 3} where FT<:AbstractFloat}, Vector{Bool}}}, Int64}, StructArrays.StructVector{CheckpointOutputWriter, NamedTuple{(:Δtout, :filepath, :overwrite), Tuple{Vector{Int64}, Vector{String}, Vector{Bool}}}, Int64}})
   @ Subzero ~/.julia/packages/Subzero/PocJf/src/simulation.jl:240
 [6] top-level scope
   @ ~/Desktop/Caltech SURF/Code/stress_strain_v2.jl:106
 [7] include(fname::String)
   @ Base.MainInclude ./client.jl:478
 [8] top-level scope
   @ REPL[2]:1
in expression starting at /Users/rohaizharis/Desktop/Caltech SURF/Code/stress_strain_v2.jl:106