I would like to use the odeint boost integrator to look at geodesic curves in the Kerr spacetime. This necessitates running an integrator for a variety of parameter values (
You can pass runtime parameters to the system function defining your ODE:
struct ode
{
double param;
ode( double param ) : m_param( param ) {}
void operator()( state_type const& x , state_type& dxdt , time_type t ) const
{
// your ode
}
};
integrate_const( stepper {} , ode { 0.1 } , x , t_start , t_end , dt , observer );
I ran into a similar problem. What I did was defined global vars so that my function could access the variable I passed via argvs. Let me know if you need example.