Home > Publications > Implementing Runge-Kutta Solvers in Java

Implementing Runge-Kutta Solvers in Java


The theory and implementation of numerical ordinary differential equation (ODE) solvers for initial-value problems (IVPs) are well established. There are many software packages designed for this purpose, the vast majority of which are implemented either in classical programming languages such as FORTRAN or C or in more modern languages such as C++ or Matlab. But, to our knowledge, there has never been such implementation in Java, a programming language that is very common and growing more popular every day.

This thesis describes the Java software package odeToJava, which solves ODEs using Runge-Kutta methods. It is available at http://www.netlib.org/ode. To our knowledge, no other such implementation exists in the public domain. odeToJava should appeal to the person who wants fast and accurate solutions to stiff and nonstiff IVPs but may be more comfortable using Java than FORTRAN or Matlab.

odeToJava includes an embedded Dormand-Prince Runge-Kutta solver with an interpolant similar to Matlab’s ode45. Step-size control by a step-doubling method can also be used in the absence of embedded methods. It also allows the user to specify an arbitrary Runge-Kutta triple with the options of event location and stiffness detection. For stiff problems, there is a linearly implicit implicit-explicit Runge-Kutta solver.

These solvers are tested on some well-known IVPs, and the numerical solutions are visualized with odeToJava’s plotting tool. It turns out that Java is a more competitive medium for the numerical solution of ODEs than some may have originally thought.

Author: Murray D. Patterson

Advisor: Raymond J. Spiteri

Download: mpatterson_bcs_thesis