rkc4a:=proc(neqn,t0,tf,u0,nsteps,u) # # Procedure rkc4a computes an ODE solution by a fixed step # classical fourth order RK method for a series of points # along the solution by repeatedly calling procedure ssrkc4 # for a single classical fourth order RK step. # # Argument list # # neqn number of first order ODEs # # t0 initial value of independent variable # # tf final value of independent variable # # u0 initial condition vector of length neqn # # nsteps number of rkc4 steps # # u ODE solution vector of length neqn after # nsteps steps # # Type variables local e, h, i, j, tm, t: # # Size arrays e:=array(1..neqn): # # Integration step h:=(tf-t0)/nsteps: # # nsteps rkc4 steps tm:=t0: for j from 1 to nsteps do # # rkc4 step read "c:\\odelib\\maple\\ode2x2\\ssrkc4.txt": ssrkc4(neqn,tm,u0,h,u,e): t:=tm+h: # # Reset base point values for next rkc4 step for i from 1 to neqn do u0[i]:=u[i]: end do: tm:=t: # # Next rkc4 step end do: # # End of rkc4a end: