Modified dense output in odeint.h Output structure


tae
07-11-2012, 07:39 AM
Let?s say I have an arbitrary array of x-values, xvals[n], where x1 <= xvals[i] <= x2, for all i, and in general, the array is not sorted into ascending or descending order. I would like to be able to construct an Output object as Output out(xvals), and then after solving the system, call out.ysave[j][i] to return the jth solution at xvals[i]. Can anyone tell me what is the minimum modification to get this working? I want to use this with StepperStoerm and StepperSie, but hopefully it only requires modifying the Output structure in odeint.h. My attempt to do this even with xvals monotonically increasing (using code suggested in the NR forum thread Dense Output, Chapter 17, ODE, specific y at x (http://www.nr.com/forum/showthread.php?p=4932)) did not give the correct solution.


Thanks for any help