I want to rebase MethodOfLines.jl on to MetaTheory, can you help me?
xtalax opened this issue · 1 comments
Hi, I'm the main dev over at MethodOfLines.jl, a symbolic Finite Difference PDE Discretizer built on Symbolics and SymbolicUtils.
We're currently using SymbolicUtils for our rewrite rules, defining which differential expressions should be replaced with which finite difference expressions. This code was originally written in around April of 2021, potentially before SymbolicUtils started using MetaTheory
Due to the nature of unidirectional rewrite rules, we currently have a bunch of rewrite rules, some more specific than others. As such, we have to be very careful about order of application of the rules, and we have no generalized way of allowing users to specify their own finite difference schemes (as rules), and allowing them to feed them in.
What I would like to do is specify all of the schemes as MetaTheory rules, and give them some score related to their accuracy and computational cost, massively weighting against undiscretized terms, then use the technique described in your JuliaCon 2021 talk here to find the best discrete representation of the PDE, given some heuristic parameters by the user weighting the relative importance of accuracy and speed. This can go as deep as using fourier transform rules to simplify the system, and even find analytic results, but I digress.
My questions to you are; with your experience with MetaTheory and EGraphs:
- Does this sound like a potentially good use case of your rewriting system?
- What are the pitfalls with such a method to avoid?
- How does one translate between the Symbolics representation and the MetaTheory representation of an expression?
- How does one go about learning to write a rule system, is there a math rule stdlib?
- Where is the PDE discretization tutorial mentioned on page 6 of the High-performance symbolic-numerics via multiple dispatch paper?
Thanks, discovering the idea behind your package has given me many ideas, and I'm excited to try them out!
Related: SciML/MethodOfLines.jl#219