PartitionedArrays and DifferentialEquations

Hi everyone,

Are there any example combining DifferentialEquations and PartitionedArrays?

Of course I’ve tried myself, but I’ve encountered obstacles because DifferentialEquations implies explicit indexing a[i] while PartitionedArrays forbids it (without explicitely selecting the global/local view).

see Find the right "default" distributed setup · Issue #1568 · SciML/OrdinaryDiffEq.jl · GitHub. Some stuff needs to be worked out for it.

No, it absolutely does not, otherwise CuArrays, which does not allow scalar indexing, would not work with DifferentialEquations.jl. But it works because DifferentialEquations.jl only uses broadcast internally.

1 Like

Thanks for the confirmation.

I meant the actual combination of DifferentialEquations.jl and PartitionedArrays.jl leads to an attempt of scalar indexing. I’ve tried to tweak PartitionedArrays.jl to achieve my goal but I haven’t succeed yet. Maybe a solution would be to (re)define Broadcast rules for PartitionedArrays, to loop on the internal “parts”. (@ChrisRackauckas : I know you’re not the package author, I am just thinking out loud).

If broadcast isn’t overloaded, then indeed that will be required.