-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A request for comment - Symbolic PDE Frontend #8
Comments
A SciML discretizer package implements the following:
|
Replying to SciML/FiniteVolumeMethod.jl#29. I discuss a lot of this at https://danielvandh.github.io/FiniteVolumeMethod.jl/stable/interface/ and https://danielvandh.github.io/FiniteVolumeMethod.jl/stable/math/. A high-level overview is as follows:
$$ where
$$
So, the domain types are supposed to be any; the main equation just needs to be provided with a function How's that? |
That sounds good. So the way we could go about this is:
|
That would be good. FYI, the package uses a vertex-centred discretisation, but some other people do something like a cell-centred method, though I'm not sure that changes any of these steps (maybe it's just buried in the details of With this type of scheme, would it be simple to do something like the following (this is adaptive mesh refinement with a posteriori error estimators):
I'd be a bit concerned with the time it might take to complete 3--6 to implement this approach, since we'd need to keep going back to step 2. This isn't a necessary feature of course, but just something worth considering (depending on the scope of this project, anyway). |
Would you need to redefine the interior functions for the new mesh every time? If so then regenerating these each time can't be avoided, but if not we can design it in such a way that it is unnecessary. We can also get away with reconstituting the equation just once to start, I have re-ordered them in the post. I don't think there's SciMLProblem for dealing with such adaptive refinement, but perhaps we can define one which can deal with this. Overall I think such a scheme is achievable, but will need it's own Edit: By step 2, I mean converting to the integral form in case that wasn't clear |
Hmm, I believe that since refining would introduce new points the system of equations would change, so as you say regenerating them is probably necessary. I was thinking that since points only get added but never deleted, you're only adding new equations, but of course the geometry relationships change. The reordering is good. I think as long as it's easy to work with the solution, and I can't imagine why not, this type of (adaptive) post-processing should be easy to implement separate to this package/SciML. |
With broadcasted symbolic operations, recompilation is not too much overhead, I'm working on this now. Scalarised, elementwise equations moreso. We have a system for post solve solution wrapping, check out the MOL solution interface. |
Calling all lurkers, yes you 👀.
Chances are if you are reading this you are interested in solving PDEs - we want to hear your ideas for a common base either here or in an issue.
What information do you need to discretize a system of PDEs, mathematically defined with ModelingToolkit.jl, in your package of choice, returning a SciMLSystem with
symbolic_discretize
, or SciMLProblem withdiscretize
, or both?We have a system for recognizing location and type of boundary condition, and extracting independent and dependent variables from the equations. In MethodOfLines.jl and (soon) NeuralPDE.jl we are using Symbolics and SymbolicUtils as an IR, see here for information on how to use rewrite rules, and here for how a simple discretizer is implemented in MOL. We want to expand this common parsing to get enough information to make it easy to discretize symbolic systems in the package of your choice.
We are hoping to collect a case study of how to write a discretizer to include in the docs for others to learn. If we can align on a common frontend language and parser (optional in stages), and common benchmarking based on PDESystemLibrary, we can massively improve the state of solving PDEs in Julia.
But what IR/form do you need for the main equations? What about domain types? What is important to you? Any ideas please let us know.
Any questions about the current state of the SciML PDEs ecosystem also welcome.
The text was updated successfully, but these errors were encountered: