Skip to content

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

@darioizzo

Description

@darioizzo

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions