  GNU-Darwin Web
section r of routines in rkutta.i Home

Manual

Packages

Global Index

Keywords

Quick Reference

# functions in rkutta.i - r

 rk4 ``` y_at_x_plus_dx= rk4(y,dydx, x,dx, derivative) takes a single 4th order Runge-Kutta step from X to X+DX. DERIVATIVE(y,x) is a function returning dydx; the input DYDX is DERIVATIVE(y,x) at the input (X,Y). This fourth evaluation of DERIVATIVE must be performed by the caller of rk4. interpreted function, defined at i/rkutta.i line 233 ```

 rk_integrate ``` y= rk_integrate(derivative, y1, x, epsilon, dx1) integrates dydx= DERIVATIVE(y,x) beginning at (X(1),Y1) and going to X(0) with fractional error EPSILON. The result is the value of y at each value in the list X. If non-nil, DX1 will be used as initial guess for the first step size. Otherwise, X(2)-X(1) will be the first step size guess. The list of X values must be monotone -- strictly increasing or strictly decreasing; the Runge-Kutta step sizes are selected adaptively until the next X value would be passed, when the step size is adjusted to complete the step exactly. The external variable rk_maxits (default 10000) is the maximum number of steps rk_integrate will take. If a function rk_yscale(y,dydx,x,dx) exists, it is used to compute an appropriate yscale to give the EPSILON error criterion meaning. Otherwise, yscale is taken to be: abs(y)+abs(dydx*dx)+1.e-30 Based on odeint from Numerical Recipes (Press, et.al.). If the function you are trying to integrate is very smooth, and your X values are fairly far apart, bs_integrate may work better than rk_integrate. interpreted function, defined at i/rkutta.i line 14 ``` SEE ALSO: rkutta,   bs_integrate,   rk_maxits,   rk_minstep,   rk_maxstep,   rk_ngood,   rk_nbad,   rkdumb,   rk4

 rk_maxits ``` rk_maxits keyword, defined at i/rkutta.i line 142 ``` SEE rk_nstore

 rk_maxstep ``` rk_maxstep keyword, defined at i/rkutta.i line 142 ``` SEE rk_nstore

 rk_minstep ``` rk_minstep keyword, defined at i/rkutta.i line 142 ``` SEE rk_nstore

 rk_nbad ``` rk_nbad keyword, defined at i/rkutta.i line 142 ``` SEE rk_nstore

 rk_ngood ``` rk_ngood keyword, defined at i/rkutta.i line 142 ``` SEE rk_nstore

 rk_nstore ``` rk_nstore, rk_maxits, rk_minstep, rk_maxstep, rk_ngood, rk_nbad rk_nstore maximum number of y values rkutta (bstoer) will store after rkutta (bstoer) call, rk_y and rk_x contain stored values The other variables are inputs or outputs for rkutta, bstoer, rk_integrate, or bs_integrate: rk_maxits maximum number of steps (default 10000) rk_minstep minimum step size (default 0.0) rk_maxstep maximum step size (default 1.e35) rk_ngood number of good steps taken rk_nbad number of failed (but repaired) steps taken keyword, defined at i/rkutta.i line 142 ```

 rk_store ``` rk_store interpreted function, defined at i/rkutta.i line 163 ```

 rkdumb ``` y_of_x= rkdumb(derivative, y0,x0, x1,nsteps) integrates dydx= DERIVATIVE(y,x) beginning at (X0,Y0) and going to X1 in NSTEPS 4th order Runge-Kutta steps. The result is dimsof(Y0)-by-(NSTEPS+1) values of y at the points span(X0, X1, NSTEPS+1). If the nosave= keyword is non-zero, the returned value will simply be the final y value. interpreted function, defined at i/rkutta.i line 184 ```

 rkqc ``` rkqc interpreted function, defined at i/rkutta.i line 205 ```

 rkutta ``` y1= rkutta(derivative, y0,x0, x1,epsilon, dx0) integrates dydx= DERIVATIVE(y,x) beginning at (X0,Y0) and going to X1 with fractional error EPSILON. The result is the value of y at X1. DX0 will be used as the initial guess for a step size. If the external variable rk_nstore is >0, rk_y and rk_x will contain up to rk_nstore intermediate values after the call to rkutta. Consider using rk_integrate if you need this feature; using rk_nstore gives you the results at intermediate values which will tend to be closer where the Runge-Kutta step size was smaller, while rk_integrate forces you to specify precisely which x values you want. The external variable rk_maxits (default 10000) is the maximum number of steps rkutta will take. The variable rk_minstep (default 0.0) is the minimum step size. The variable rk_maxstep (default 1.e35) is the maximum step size, which you may need if you are storing intermediate values (particularly with bstoer). If a function rk_yscale(y,dydx,x,dx) exists, it is used to compute an appropriate yscale to give the EPSILON error criterion meaning. Otherwise, yscale is taken to be: abs(y)+abs(dydx*dx)+1.e-30 Based on odeint from Numerical Recipes (Press, et.al.). If the function you are trying to integrate is very smooth, bstoer will probably work better than rkutta. interpreted function, defined at i/rkutta.i line 52 ``` SEE ALSO: rk_integrate,   bstoer,   rk_nstore,   rk_maxits,   rk_minstep,   rk_maxstep,   rk_ngood,   rk_nbad,   rkdumb,   rk4

 rzextr ``` rzextr interpreted function, defined at i/rkutta.i line 338 ```