SciML / PDEBase.jl

Common types and interface for discretizers of ModelingToolkit PDESystems.
MIT License
12 stars 5 forks source link

Adding support for PDEs with terms like u(2x) and not just u(x) #13

Closed nicholaskl97 closed 4 months ago

nicholaskl97 commented 1 year ago

This PR adds a get_all_indvars function so that constructing a VariableMap from a PDESystem does not assume that the arguments of the function calls are always independent variables.

PINNs aren't limited to simple PDEs like $\partial_{xx} u = \partial_t u$, but can even be used to solve strange equations such as $u\left(2x - u(x - 3)\right) = x^2$. To properly parse such expressions in Julia's PINN package, NeuralPDE, we cannot in this package assume that the argument of $u(\cdot)$ is always a list of independent variables.

This PR also adds test cases for this functionality, which rely on a (likely flawed) equality operation for VariableMap objects.

@xtalax These are the changes to PDEBase I've made, re: our discussion on Slack of changing the NeuralPDE parser.