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

Runge-Kutta method #529

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Runge-Kutta method #529

wants to merge 1 commit into from

Conversation

sharkdp
Copy link
Owner

@sharkdp sharkdp commented Aug 10, 2024

This adds a new dsolve_runge_kutta method that can be used to solve first order ordinary differential equations y'(x) = f(x, y) with initial condition y(x0) = y0 numerically:

fn dsolve_runge_kutta<X: Dim, Y: Dim>(
  f: Fn[(X, Y) -> Y / X],
  xs: List<X>,
  y0: Y) -> List<Y>

The function signature is not ideal. I would want it to take just x0 instead of the whole list of xs. Instead, the method should return both List<X> and List<Y> (in a struct) or something like List<Pair<X, Y>>. But that is not yet possible in Numbat => #452.

@sharkdp sharkdp force-pushed the dsolve_runge_kutta branch from ef790ab to 4060249 Compare August 10, 2024 12:07
@sharkdp sharkdp mentioned this pull request Aug 10, 2024
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.

1 participant