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

provide exported function for generating MTKParameters from user parameter maps #2954

Closed
isaacsas opened this issue Aug 12, 2024 · 5 comments · Fixed by #2955
Closed

provide exported function for generating MTKParameters from user parameter maps #2954

isaacsas opened this issue Aug 12, 2024 · 5 comments · Fixed by #2955

Comments

@isaacsas
Copy link
Member

isaacsas commented Aug 12, 2024

In Catalyst we often found it useful to have functionality to take a parameter map and system defaults (or u0 map and defaults) and return the parameter representation used in solvers via varmap_to_vars. Such functionality doesn't seem to exist anymore with the move to MTKParameters, with one instead needing to build a full ODEProblem (or JumpProblem, etc) and then extract oprob.p. It would be nice to have an exported, user-facing function for building p without needing to go through building a full problem.

@ChrisRackauckas
Copy link
Member

@AayushSabharwal how feasible do you think this is?

@AayushSabharwal
Copy link
Member

ModelingToolkit.MTKParameters(sys, p, u0). The last argument is optional.

@ChrisRackauckas
Copy link
Member

Can we get a docstring and a doc page on it? Make it public API?

@AayushSabharwal
Copy link
Member

Sure

@isaacsas
Copy link
Member Author

Awesome, thanks!

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 a pull request may close this issue.

3 participants