#Working with non-numbers in OrdinaryDiffEq

1 messages · Page 1 of 1 (latest)

nocturne pike
#

I'm trying to work with an ode problem with SVectors, but the OrdinaryDiffEq package has discontinued non-number uses. I don't think the recommended recursivearraytools are great for my use case. Ideally, I think I'd like something like a MatrixOfArray type instead of the VectorofArray that recursivearraytools offers. Are there any alternatives?

ERROR: Non-Number element type inside of an Array detected.
Arrays with non-number element types, such as
Array{Array{Float64}}, are not supported by the
solvers.

If you are trying to use an array of arrays structure,
look at the tools in RecursiveArrayTools.jl. For example:

If this was a mistake, promote the element types to be
all the same. If this was intentional, for example,
using Unitful.jl with different unit values, then use
an array type which has fast broadcast support for
heterogeneous values such as the ArrayPartition
from RecursiveArrayTools.jl. For example:

using RecursiveArrayTools
u0 = ArrayPartition([1.0,2.0],[3.0,4.0])
u0 = VectorOfArray([1.0,2.0],[3.0,4.0])

are both initial conditions which would be compatible with
the solvers. Or use ComponentArrays.jl for more complex
nested structures.

Element type:
SVector{3, Float64}

Some of the types have been truncated in the stacktrace for improved reading. To emit complete information
in the stack trace, evaluate TruncatedStacktraces.VERBOSE[] = true and re-run the code.

elder stream
#

VectorOfArray might support a matrix form by now? I think someone did a PR