Closed martinmestre closed 6 days ago
We use Vector{SVector{3, Float64}}
or similar to represent coordinates. So the dimension of the SVector
is the dimension of the space in which the simulation happens.
Thanks a lot! I understand that Vector{SVector{3, Float64}}
is a static array, right? When calling the ODE solver, do you need to flatten it into a single array? That is the problem I am having when trying to use solvers in DifferentialEquations.jl. In some part I need to do u[1:n]
and that breaks the static format.
Vector{SVector{3, Float64}}
is a vector of static arrays, but itself is not static. I'm not so familiar with DifferentialEquations as we don't use it, but you can use reinterpret
to get a Vector{Float64}
with 3x the length.
Thanks a lot!
Hi, thanks for the package. I would like to know in which script or line of code you use
StaticArrays
, and how do you work with the number of particles which is not know at compile time. Does your ODE solver require a phase-spaceSVector
with dimension proportional to the number of particles ? Thank you very much.