Next: Hamiltonian systems Up: Splice and template Previous: Combining code

A generalised Runge-Kutta subroutine

Consider the problem of writing a general subroutine for a Runge-Kutta scheme [13] for a system of ordinary differential equations. The convention of writing an -dimensional vector in a bold typeface is adopted.

The general s-stage Runge-Kutta method for the initial-value problem

is defined by where and the row-sum conditions are usually assumed to hold. Furthermore, if for , then the method is said to be an explicit or classical Runge-Kutta scheme and the can be calculated by a straightforward recursion.

Structural information for a problem, should invariably be exploited in a symbolic system, since the resulting performance gains can be significant [4]. The same techniques should be applied when creating a general template file. A lot of the tedium can be removed from the analysis of a large number of problems and greater throughput is enabled. The next section contains such an example.



bondaren@thsun1.jinr.ru