-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Symbolic indexing fails for Nonlinear problem integrators #662
Labels
bug
Something isn't working
Comments
5 tasks
A slight follow-up on this. Is it intentional that you cannot use using ModelingToolkit, NonlinearSolve
# Creates our system.
@parameters p d
@variables t X(t)
eqs = [0 ~ sin(X+p) - d*sqrt(X+1)]
@mtkbuild nlsys = NonlinearSystem(eqs, [X], [p, d])
# Creates an integrator.
nlprob = NonlinearProblem(nlsys, [X => 1.0], [p => 2.0, d => 3.0])
nint = init(nlprob, NewtonRaphson())
nint[X] # works
nint[nlsys.X] # works
nint[:X] # works
nint.ps[p] # works
nint.ps[nlsys.p] # works
nint.ps[:p] # works
nint[X] = 1 # Error
nint[nlsys.X] = 1 # Error
nint[:X] = 1 # Error
nint.ps[p] = 1 # works
nint.ps[nlsys.p] = 1 # works
nint.ps[:p] = 1 # works |
Not intentional, just missing an overload. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A rather niche situation. It was discussed in private correspondence that it probably should work though, but realised there wasn't actually an issue to keep track of it, so raising one here.
The text was updated successfully, but these errors were encountered: