wsphillips / Conductor.jl

Choo-choo
MIT License
60 stars 12 forks source link

PDE-based morphology #63

Open wsphillips opened 1 year ago

wsphillips commented 1 year ago

We should support 1-dimensional branched cable models. This boils down to creating a conversion from a CompartmentSystem to PDESystem in ModelingToolkit.jl. We should be able to convert any CompartmentSystem with a cylindrical Geometry to a discretized PDE, given some delta X and boundary conditions.

MulticompartmentSystem is a thin layer over CompartmentSystem that allows connecting compartments together. Combined with the above, it should be enough to get going with branched cable models.

To support these systems we also need:

(Some) possible approaches to implementation:

  1. Discretize compartments ourselves. Divide a CompartmentSystem into many individual compartments, apply modifications (e.g. synapses, parameter values, etc) and then broadcast convert.(ODESystem, comps)
  2. Convert from CompartmentSystem to PDESystem and use MethodOfLines.jl to discretize. This is likely more robust but I'm not sure how to setup branched compartments with this approach.

Finally, it will be interesting to see how performant out-of-the-box code generation is compared to existing domain-specific optimizations (e.g. Hines matrix + many examples of problem-specific decomposition strategies for parallelization etc)