Hi all,
I’m trying to use the DifferentialEquations.jl package to perform explicit integration of a mass-spring-damper system.
Here are the function I’m solving, and how I passed it into the SecondOrderODEProblem() function.
func = inv(M) * (f - (C *v + K* d))
SecondOrderODEProblem(func, v, d, 0:tsim)
This gives me the following error:
ERROR: LoadError: ArgumentError: reducing over an empty collection is not allowed
The stack trace didn’t give much insight into which collection was empty, but I’ve just checked, and all the containers in the function aren’t empty, and my du0/u0 aren’t empty.
Here are the values for each variable in there:
M = 96x96 Diagonal{Float64, Vector{Float64}}
f = 96x1 Matrix{Float64} (every 3rd element is non-zero)
C = 96x96 Diagonal{Float64, Vector{Float64}}
v = 96x1 Matrix{Float64}
K = 96x96 Matrix{Float64}
d = 96x1 Matrix{Float64}
so that
func = 96x1 Matrix{Float64}
So, I should be passing into the SecondOrderODEProblem() function:
96x1 matrix where every 3rd element is non zero
96x1 matrix of zeros
96x1 matrix of zeros
I’m not sure exactly what the problem is here, any help is greatly appreciated!