-
Notifications
You must be signed in to change notification settings - Fork 0
Mrc 6697 Add DDE support #23
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
base: mrc-6752
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bit of a complicated example but i wanted to test out update/zeroEvery with delays in a sane way
| } | ||
| const solution = solver.run(nextTime); | ||
| stateNext = solution([nextTime])[0]; | ||
| this._history[iGroup][iParticle] = history.concat(solver.getHistory()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do not love this, I had to pass in iGroup and iParticle everywhere because of this line, where history needs to be able to append new history from the solver, the reason we dont need to do the same for shared and internal is because of pass by reference in javascript, i could pass in history and convert this line to
history.push(...solver.getHistory())and this would work but this pushed the elements of solver.getHistory() onto the stack which is limited and can fail for big histories so not ideal, wasn't sure what to do otherwise, i would prefer not doing anything weird like passing in a callback that modifies the current history either
i could also make it into an object with an extra key but also felt like weird design
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## mrc-6752 #23 +/- ##
=============================================
+ Coverage 99.19% 100.00% +0.80%
=============================================
Files 7 7
Lines 371 380 +9
Branches 74 78 +4
=============================================
+ Hits 368 380 +12
+ Misses 3 0 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
more than half the lines are package lock diff, did an npm audit fix |
This PR adds DDE support. Because of the
runParticleWithDtpath, we need to remember the past history to let the solver feed in the correct values for the delayed solutions, otherwise it will not remember the values past adttime windowsome dopri changes make the history public and we can get it and manage the history ourselves