- #1
FunkyDwarf
- 489
- 0
Hey guys,
Attempting to write an adaptive step size function into a 4th order runge kutta integrator for basic orbits.
The problems (so far) are as follows:
1.) The step size does not seem to change as one would expect if the recursive definition of the StepSize function was working properly
2.) When compared with the mathematica solution, it would seem the orbit doesn't extend as far as it should in time, ie the arc length is shorter. It would seem this is due to the coordinates remaining constant after a certain point.
Code can be found here:
http://members.iinet.net.au/~housewrk/programtest.cpp
Apologies in advance for stupid errors and crappy coding :)
Cheers
-G
Attempting to write an adaptive step size function into a 4th order runge kutta integrator for basic orbits.
The problems (so far) are as follows:
1.) The step size does not seem to change as one would expect if the recursive definition of the StepSize function was working properly
2.) When compared with the mathematica solution, it would seem the orbit doesn't extend as far as it should in time, ie the arc length is shorter. It would seem this is due to the coordinates remaining constant after a certain point.
Code can be found here:
http://members.iinet.net.au/~housewrk/programtest.cpp
Apologies in advance for stupid errors and crappy coding :)
Cheers
-G
Last edited by a moderator: