# JuliaDiffEq with custom types

**URL:** <https://discourse.julialang.org/t/juliadiffeq-with-custom-types/16294>\
**Category:** Numerics\
**Tags:** diffeq\
**Created:** [October 13, 2018, 9:57pm UTC](https://discourse.julialang.org/t/juliadiffeq-with-custom-types/16294 "2018-10-13T21:57:52Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Egwene\_al\_Vere](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Post date:** [February 13, 2019, 11:25pm UTC](https://discourse.julialang.org/t/juliadiffeq-with-custom-types/16294/18 "2019-02-13T23:25:10Z")

</div>

On this topic, there’s currently an issue [here](https://github.com/JuliaDiffEq/RecursiveArrayTools.jl/issues/44) that `ArrayPartition` is not compatible with esp. stiff solvers since linear algebra is not implemented for it, (it’s mentioned that `PartitionedODEProblem` use them internally so maybe it’s also affected? btw, `PartitionedODEProblem not defined` appears to be undefined, looks like [code is absent](https://github.com/search?q=PartitionedODEProblem&type=Code))

Is there a roadmap about what needs to be done if one wishes to help with it (overloading the functions with `ArrayPartition` or copy it in a linearized way to a cache)? It can be very useful for a set of coupled odes that included matrices, vectors and numbers, e.g.

> v’ = fv(m\_i,v,s)  
> m\_i’ = fm(m\_j,v,s)  
> s’ = fs(m\_i,v,s)  
> where v is a vector, m\_{1…n} are matrices and s is a number.

right now, I’m handling it through reshaping v,m,s to 1d and vcat them together, speed is okay for small systems but for bigger systems it may require preallocating and passing the preallocated arrays via the `p` parameter ([may still generate some allocations](https://discourse.julialang.org/t/reduce-allocations-for-shaped-views/20757/)).

---

_[View the full topic](https://discourse.julialang.org/t/juliadiffeq-with-custom-types/16294)._
