MethodOfLines.jl
MethodOfLines.jl copied to clipboard
Plot recipes
Hello, thanks for creating this package. I would like to help with implementing plot recipes and I was thinking that having a data structure that stores / computes the grid + time span together with the solution data could help. I have worked on a package that used this idea (PICDataStructures.jl) and I was thinking to create a more general solution by re-implementing some of its parts that could benefit the SciML ecosystem more broadly.
More technically, I'm thinking that there is a need for a new type for a PDE solution which could be used for plot(pde_sol), as with the current types we plot the solution of the PDE discretization and transforming it back to something useful for users requires further processing (i.e. #82). This new type would need to be built with information about the discretization, so that we can map the discretization type to how the grid and timespan are represented in the solution, so that we know how to plot them.
Another aspect that, I believe, would be of interest would be extensibility: How easy would it be to extend the above mentioned solution to new discretization types besides MethodOfLines or how could one re-use this to plot solutions obtained from outside SciML, i.e. read a finite difference solution from a file and plot it (this was the motivation for my PICDataStructures.jl package.
One immediate question would be what plotting recipe system(s) will be used: RecipesBase or Makie/MakieCore.
Let me know what you think about this.
A PDE Solution type is actually currently in the works, @zoemcc is making a start there, but once this is done plotting recipes will be extremely useful and I'd value your help in getting these set up.
I'm prototyping a design for the PDESolution in some other work that I'm doing. The current design is based around MultiDimensionalFunctions that I have in this repo: https://github.com/zoemcc/DFNExperiments.jl/blob/main/src/multi_dimensional_function.jl . Once I finish a sprint I should have time to generalize it and do a cleaning pass or two before I put it into SciMLBase. It has some stuff around plotting and comparing to other data but it's not as comprehensive as I'd like yet, I'm building up the capability as I need it.