Skip to content
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

feat: perform limited DAE initialization for null integrators/solutions #1070

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

AayushSabharwal
Copy link
Member

@AayushSabharwal AayushSabharwal commented Aug 6, 2024

Requires SciML/SciMLBase.jl#760 for the constructorof method

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

Add any other context about the problem here.

if SciMLBase.has_initializeprob(prob.f) && SciMLBase.has_initializeprobpmap(prob.f)
initializeprob = prob.f.initializeprob
nlsol = solve(initializeprob)
@set! prob.p = prob.f.initializeprobpmap(prob, nlsol)
Copy link
Member

Choose a reason for hiding this comment

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

isn't the map in-place?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. I think I wrote this when it was out-of-place, and didn't update it. Will edit and check

Copy link
Member Author

Choose a reason for hiding this comment

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

No wait it's out of place 😅 with the idea that solving should not change the problem since then there's a chance for stateful errors where solving the same problem multiple times leads to different results

@AayushSabharwal AayushSabharwal marked this pull request as ready for review October 7, 2024 13:20
@ChrisRackauckas ChrisRackauckas merged commit 78680e1 into SciML:master Oct 7, 2024
30 of 38 checks passed
@AayushSabharwal AayushSabharwal deleted the as/param-init branch October 7, 2024 14:40
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.

2 participants