I want to choose integration scheme through a if statement like this:
//stepper_type steppr; ??
if (integration_scheme == "euler") {
[auto] stepper = euler<state_type>{};
}
else
{
[auto] stepper = runge_kutta4<state_type>{};
}
but stepper is only valid inside the curly bracket. What is the type of stepper to be defined before the if statement? another way is to pass the integration scheme (or even stepper) as an argument to a function.