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

[FEATURE] - Construct the variational dynamics with incomplete lists for vars and pars, without referring explicitly to variable names. #448

Open
darioizzo opened this issue Sep 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@darioizzo
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Right now we can construct the variational dynamics with:

auto vsys = var_ode_sys(some_dyn(), var_args::vars, 2);
auto vsys = var_ode_sys(some_dyn(), var_args::vars | var_args::pars , 2);
auto vsys = var_ode_sys(some_dyn(), {x,v,par[2],par[1]} , 2);

Describe the solution you'd like
It can be useful to be able to ask for the variational equations including all the state and only some parameters.

auto vsys = var_ode_sys(some_dyn(), var_args::vars | {par[2], par[6]}, 2);

Describe alternatives you've considered
Alternatively the full list of vars can be passed, but needs to be constructed first and consistent with whatever is returned by some_dyn

auto [x, y, z, vx, vy, vz, m] = make_vars("x", "y", "z", "vx", "vy", "vz", "m");
auto vsys = var_ode_sys(some_dyn(), {x,y,z,vx,vy,vz,m,par[2], par[6]}, 2);
@darioizzo darioizzo added the enhancement New feature or request label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant