This refers to instantiation and "uninstantiation".
I need to solve an ode system many times with a varying paramter p in an iterative loop.
It seems that I cannot use "out" and "ode" repetitively in the code below.
The code works when N=1.
Is there a way of "uninstantiating" and then "reinstantiating" "out" and "ode" so that the program works for N>1?
I have searched the web and C++ books without success.
I'd appreciate some advice.
Best wishes
Alan
Doub x1, x2, h, p;
Int N;
x1=0.0, x2=1.0;
N=5;
for (Int i=0;i<N;i++)
{
p=0.1*i;
Output out(1000);
rhs_van d(p);
Odeint<StepperDopr5<rhs_van> > ode(ystart,x1,x2,atol,rtol,h1,hmin,out,d);
ode.integrate();
}