Skip to content

fix: enable support for complex ODEProblem again #3764

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

oameye
Copy link
Contributor

@oameye oameye commented Jun 24, 2025

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

resolves #3763

@oameye
Copy link
Contributor Author

oameye commented Jun 24, 2025

Is their a chance this change can be backported to v9? As of v9.73 complex ODEProblem solving is broken.

@ChrisRackauckas
Copy link
Member

Yeah @AayushSabharwal could setup the backport.

@oameye
Copy link
Contributor Author

oameye commented Jun 24, 2025

Awesome :)

@AayushSabharwal
Copy link
Member

This implementation will cause all tunables and constant parameters to be stored as complex values if anything is complex. I'm not sure if that's what we want.

@ChrisRackauckas
Copy link
Member

I think that's right due to the promotion rules?

Copy link
Member

@AayushSabharwal AayushSabharwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't particularly mind it either way, just making sure we're on the same page. The operating point [x => 0.5im, par => 5] will cause par to promote to 5.0 + 0.0im.

@ChrisRackauckas
Copy link
Member

Yes I think that's expected, because the derivative will also have non-trivial complex values, so at least the tunables needs to change to complex.

@ChrisRackauckas ChrisRackauckas merged commit 02ae459 into SciML:master Jun 25, 2025
40 of 50 checks passed
@ChrisRackauckas
Copy link
Member

Can you do the backport?

@AayushSabharwal
Copy link
Member

Sure

@oameye
Copy link
Contributor Author

oameye commented Jun 26, 2025

bump for the backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MTK doesn't support complex equations of motion since [email protected]
3 participants