Skip to content

Conversation

@M-Kusumgar
Copy link
Contributor

@M-Kusumgar M-Kusumgar commented Sep 18, 2025

This PR adds DDE support. Because of the runParticleWithDt path, 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 a dt time window

some dopri changes make the history public and we can get it and manage the history ourselves

Copy link
Contributor Author

@M-Kusumgar M-Kusumgar Sep 18, 2025

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());
Copy link
Contributor Author

@M-Kusumgar M-Kusumgar Sep 18, 2025

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
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (73c3278) to head (59e5b60).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@M-Kusumgar
Copy link
Contributor Author

more than half the lines are package lock diff, did an npm audit fix

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