-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Mismatch in Symbolic names, when using symbolic arrays as state variables #341
Comments
You can try scalarizing yourself before solving, we try to do this internally to make systems compatible. please be aware that ODEFunction is intended to be internal for MOL, you should try getting this with Non equidistant grid is supported, see: https://docs.sciml.ai/MethodOfLines/stable/nonuniform/. you can also write you can use
to get the grid points, nb it is recommended to use I will look at this bug in more detail soon |
Describe the bug 🐞
When using symbolic arrays as state variables, the name of the corresponding discretized state currently use several stacked
var""
. When trying to relate the discretized variables back to the original pde variables, this name is hard to reconstruct.This leads to special cases and bugs, e.g. when trying to extract grid locations for a pde-variable as in the example below.
Expected behavior
Either avoid generating the names with several "var" or modify function
_get_gridloc
to deal with this case.SciMLBase.ODEFunction(pdesys)
should not throw an error.Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
We use symbolic arrays as state variables, so that we can concisely generate similar equations for several states.
We also want to use non-equidistant spacial 1-d grid.
For modifying the problem state (reapplying the boundary condition function with different parameters that are optimized) I need to get the grid locations from the system or problem.
This works for scalar symbolic states, but fails for the symbolic arrays.
This is not urgent. I just want to support development and testing with this MWE.
The text was updated successfully, but these errors were encountered: