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

reuse solver object #232

Open
florian98765 opened this issue Apr 27, 2023 · 0 comments
Open

reuse solver object #232

florian98765 opened this issue Apr 27, 2023 · 0 comments

Comments

@florian98765
Copy link

Dear torchdiffeq Developers,
Thanks a lot for this useful library. We started using odeint and odeint_adjoint for solving inverse magnetic problems in our opensource project magnum.np.

Our current design just performs one timestep after each other and in between the timesteps the control is returned to the user, where logging and other post processing tasks can be done.
Thus, we would need an API which allows to reuse the solver object and perform multiple steps after each other.

Here is a small code snippet how we would like to use the code:

while state.t < 1e-9:
    llg.step(state, 1e-11)
    logger << state

Within llg.step we call odeint(f, [state.t, state.t+dt]).

Would it be possible to provide the missing interface?

thanks and best wishes
Florian

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