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

What should be the signature of the rhs #6

Open
hgrecco opened this issue Nov 17, 2020 · 0 comments
Open

What should be the signature of the rhs #6

hgrecco opened this issue Nov 17, 2020 · 0 comments

Comments

@hgrecco
Copy link
Owner

hgrecco commented Nov 17, 2020

There are two right-hand side functions

  1. user_rhs: provided by the user to the Solver
  2. step_rhs: provided by the Solver to step

There are (at least) 3 different signatures:

def simple(t: float, y: ndarray_1d) -> ndarray_1d:
    pass

def with_args(t: float, y: ndarray_1d, *args) -> ndarray_1d:
    pass

def with_p(t: float, y: ndarray_1d, p: ndarray) -> ndarray_1d:
    pass
  1. Might not need recompilation of step (in the future)
    • simple
    • with_p (if p is always the same, i.e. a 1d vector)
  2. Provide greater flexibility
    • with_args
    • with_p
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

No branches or pull requests

1 participant