# RKCheck 3.1

RKcheck is a small application written in Java, that checks the order of Runge-Kutta methods.

RKcheck is a small application written in Java, that checks the order of Runge-Kutta methods.

The Runge-Kutta method is specified by its Butcher-array in a simple xml file with the following structure:

< ?xml version="1.0" encoding="UTF-8" ? >

< !DOCTYPE Runge-Kutta PUBLIC "-//spaceroots.org//DTD Runge-Kutta V1.2//EN"

"http://www.spaceroots.org/Runge-Kutta.dtd" >

< !-- this is the classical Runge-Kutta method -- >

< Runge-Kutta name="classical Runge-Kutta" >

< time-steps >

< zero/ >

< rational > < p >1< /p > < q >2< /q > < /rational >

< rational > < p >1< /p > < q >2< /q > < /rational >

< one/ >

< /time-steps >

< internal-weights >

< row >

< !-- empty first row -- >

< /row >

< row >

< rational > < p >1< /p > < q >2< /q > < /rational >

< /row >

< row >

< zero/ > < rational > < p >1< /p > < q >2< /q > < /rational >

< /row >

< row >

< zero/ > < zero/ > < one/ >

< /row >

< /internal-weights >

< estimation-weights >

< rational > < p >1< /p > < q >6< /q > < /rational >

< rational > < p >1< /p > < q >3< /q > < /rational >

< rational > < p >1< /p > < q >3< /q > < /rational >

< rational > < p >1< /p > < q >6< /q > < /rational >

< /estimation-weights >

< /Runge-Kutta >

The preceding example shows how to describe the classical Runge-Kutta method. The corresponding Butcher array can be written in a human-readable form:

O |

1/2 | 1/2

1/2 | 0 1/2

1 | 0 0 1

-------------------

1/6 1/3 1/3 1/6

The tool computes the theoretical order conditions and checks if the method defined by the XML file respect these conditions. If the method has a set of coefficients for error estimation, the order of the error estimation is checked too.

By default and if the coefficients are all exact, computation is also exact, there is no approximation at all. If no exact expression is known for the coefficients, they can be entered as real values with arbitrary precision (using < real >...< /real > elements). In this case it is recommended to use the -tolerance command-line switch in order to also use approximation in the final check, otherwise the application will say the method is of order 0 because it fails even the elementary conditions ... Exact coefficients are integers, rational numbers and quadratic surds (i.e. numbers of the form (p1 + p2 sqrt(d)) / q). All quadratic surds in one file should share the same d or the operations will be impossible to perform.

This behaviour is the one provided by the default manifest file of the distribution, which declares org.spaceroots.rkcheck.CheckOrderConditions as the main class of the jar file. There is however another possible behaviour, using another main class: org.spaceroots.rkcheck.ComputeOrderConditions. This class does not read any XML method file but writes all the order conditions up to a user-defined order in LaTeX format or in Maxima format.

· ant

· junit (only for rerunning tests)

The Runge-Kutta method is specified by its Butcher-array in a simple xml file with the following structure:

< ?xml version="1.0" encoding="UTF-8" ? >

< !DOCTYPE Runge-Kutta PUBLIC "-//spaceroots.org//DTD Runge-Kutta V1.2//EN"

"http://www.spaceroots.org/Runge-Kutta.dtd" >

< !-- this is the classical Runge-Kutta method -- >

< Runge-Kutta name="classical Runge-Kutta" >

< time-steps >

< zero/ >

< rational > < p >1< /p > < q >2< /q > < /rational >

< rational > < p >1< /p > < q >2< /q > < /rational >

< one/ >

< /time-steps >

< internal-weights >

< row >

< !-- empty first row -- >

< /row >

< row >

< rational > < p >1< /p > < q >2< /q > < /rational >

< /row >

< row >

< zero/ > < rational > < p >1< /p > < q >2< /q > < /rational >

< /row >

< row >

< zero/ > < zero/ > < one/ >

< /row >

< /internal-weights >

< estimation-weights >

< rational > < p >1< /p > < q >6< /q > < /rational >

< rational > < p >1< /p > < q >3< /q > < /rational >

< rational > < p >1< /p > < q >3< /q > < /rational >

< rational > < p >1< /p > < q >6< /q > < /rational >

< /estimation-weights >

< /Runge-Kutta >

The preceding example shows how to describe the classical Runge-Kutta method. The corresponding Butcher array can be written in a human-readable form:

O |

1/2 | 1/2

1/2 | 0 1/2

1 | 0 0 1

-------------------

1/6 1/3 1/3 1/6

The tool computes the theoretical order conditions and checks if the method defined by the XML file respect these conditions. If the method has a set of coefficients for error estimation, the order of the error estimation is checked too.

By default and if the coefficients are all exact, computation is also exact, there is no approximation at all. If no exact expression is known for the coefficients, they can be entered as real values with arbitrary precision (using < real >...< /real > elements). In this case it is recommended to use the -tolerance command-line switch in order to also use approximation in the final check, otherwise the application will say the method is of order 0 because it fails even the elementary conditions ... Exact coefficients are integers, rational numbers and quadratic surds (i.e. numbers of the form (p1 + p2 sqrt(d)) / q). All quadratic surds in one file should share the same d or the operations will be impossible to perform.

This behaviour is the one provided by the default manifest file of the distribution, which declares org.spaceroots.rkcheck.CheckOrderConditions as the main class of the jar file. There is however another possible behaviour, using another main class: org.spaceroots.rkcheck.ComputeOrderConditions. This class does not read any XML method file but writes all the order conditions up to a user-defined order in LaTeX format or in Maxima format.

**Requirements:**· ant

· junit (only for rerunning tests)

- last updated on:
- February 21st, 2008, 13:51 GMT
- price:
- FREE!
- developed by:
**Luc Maisonobe**- homepage:
- www.spaceroots.org
- license type:
- BSD License
- category:
- ROOT \ Science and Engineering \ Mathematics

#### Add your review!

SUBMIT