Class CheckOrderConditions
- java.lang.Object
-
- org.spaceroots.rkcheck.CheckOrderConditions
-
public class CheckOrderConditions extends java.lang.ObjectThis application checks the order conditions of Runge-Kutta processes.It reads the description of a Runge-Kutta method from an XML file having a structure similar to this example:
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE Runge-Kutta PUBLIC "-//spaceroots.org//DTD Runge-Kutta V1.2//EN" "http://www.spaceroots.org/Runge-Kutta.dtd" > <Runge-Kutta name="Higham and Hall" > <time-steps> <zero/> <rational> <p>2</p> <q>9</q> </rational> <rational> <p>1</p> <q>3</q> </rational> <rational> <p>1</p> <q>2</q> </rational> <rational> <p>3</p> <q>5</q> </rational> <one/> <one/> </time-steps> <internal-weights> <row> <!-- empty first row --> </row> <row> <rational> <p> 2</p> <q> 9</q> </rational> </row> <row> <rational> <p> 1</p> <q> 12</q> </rational> <rational> <p> 1</p> <q> 4</q> </rational> </row> <row> <rational> <p> 1</p> <q> 8</q> </rational> <zero/> <rational> <p> 3</p> <q> 8</q> </rational> </row> <row> <rational> <p> 91</p> <q>500</q> </rational> <rational> <p>-27</p> <q>100</q> </rational> <rational> <p> 78</p> <q>125</q> </rational> <rational> <p> 8</p> <q>125</q> </rational> </row> <row> <rational> <p>-11</p> <q> 20</q> </rational> <rational> <p> 27</p> <q> 20</q> </rational> <rational> <p> 12</p> <q> 5</q> </rational> <rational> <p>-36</p> <q> 5</q> </rational> <integer>5</integer> </row> <row> <rational> <p> 1</p> <q> 12</q> </rational> <zero/> <rational> <p> 27</p> <q> 32</q> </rational> <rational> <p> -4</p> <q> 3</q> </rational> <rational> <p>125</p> <q> 96</q> </rational> <rational> <p> 5</p> <q> 48</q> </rational> </row> </internal-weights> <estimation-weights> <rational> <p> 1</p> <q> 12</q> </rational> <zero/> <rational> <p> 27</p> <q> 32</q> </rational> <rational> <p> -4</p> <q> 3</q> </rational> <rational> <p>125</p> <q> 96</q> </rational> <rational> <p> 5</p> <q> 48</q> </rational> <zero/> </estimation-weights> <error-weights> <rational> <p> -1</p> <q> 20</q> </rational> <zero/> <rational> <p> 81</p> <q>160</q> </rational> <rational> <p> -6</p> <q> 5</q> </rational> <rational> <p> 25</p> <q> 32</q> </rational> <rational> <p> 1</p> <q> 16</q> </rational> <rational> <p> -1</p> <q> 10</q> </rational> </error-weights> </Runge-Kutta>This file describes the various coefficients tables of the process. In addition to the elements displayed in this example, coefficients can also be entered as real numbers (like <real>-0.5</real> for example) with an arbitrary precision. Real numbers are converted to rational numbers during parsing, using continued fractions. For simple numbers, this is fine and exact arithmetic can still be used afterwards, however, this is not true if too few digits are given. This feature should be used with care and avoided if possible. The (<error-weights>...</error-weights>) table is optional, it is used only for embedded methods with error control.
Given this description, the application checks the homogeneity conditions and the order conditions, increasing the order until it finds contitions that are not met anymore by the coefficients arrays. It then displays the order of the method. If there is an <error-weights>...</error-weights> entry, the order of the error estimation is also displayed.
Checking is done using exact arithmetic by default. However, if a method involves real numbers for which not enough digits are given or which are not really rational numbers, it is likely that all tests will fail and the method will be declared to be of order 0 ! In this case, it is advised to use a tolerance for the final tests. Be aware however that for high orders, the order conditions typically involve small numbers like 1/7983360, so the tolerance should really be small in order to avoid too optimistic results about the order of a given method. For reliable results, it is far better to have an exact representation of the coefficients and to use only exact arithmetic.
-
-
Constructor Summary
Constructors Constructor and Description CheckOrderConditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidmain(java.lang.String[] args)Entry point of the application.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Entry point of the application.- Parameters:
args- application arguments. This application supports the following arguments :-helpto display the list of supported arguments-verboseto display the residuals for conditions not met-toleranceto set the tolerance for use when non-exact checking is desired- the uri of the XML file to check
-
-
DataMelt 3.0 © DataMelt by jWork.ORG