Module Arkode.ButcherTable

module ButcherTable: sig .. end

Butcher tables


type t = {
   method_order : int; (*

Method order of accuracy ($q$ ).

*)
   stages : int; (*

Number of stages ($s$ ).

*)
   stage_values : Sundials.RealArray2.t; (*

Matrix (stages * stages) of coefficients ($A$ )

*)
   stage_times : Sundials.RealArray.t; (*

Array (of length stages) of stage times ($c$ ).

*)
   coefficients : Sundials.RealArray.t; (*

Array (of length stages) of solution coefficients ($b$ ).

*)
   embedding : (int * Sundials.RealArray.t) option; (*

Optional embedding order ($p$ ) and array (of length stages) of embedding coefficients ($\tilde{b}$ or $d$ ).

*)
}

A butcher table.

$\begin{array}{ c|c} c & A \\ \hline q & b \ p & \tilde{b} \end{array}$

Instantiated according to stages. For example, when stages = 3: $\begin{array}{ c|ccc} c_1 & A_{1,1} & A_{1,2} & A_{1,3} \ c_2 & A_{2,1} & A_{2,2} & A_{2,3} \ c_3 & A_{3,1} & A_{3,2} & A_{3,3} \\ \hline q & b_1 & b_2 & b_3 \ p & \widetilde{b_1} & \widetilde{b_2} & \widetilde{b_3} \end{array}$

type erk_table = 
| HeunEuler_2_1_2 (*

Default 2nd order explicit method.

*)
| BogackiShampine_4_2_3 (*

Default 3rd order explicit method.

*)
| ARK324L2SA_ERK_4_2_3 (*

ARK-4-2-3 ERK method.

*)
| Zonneveld_5_3_4 (*

Default 4th order explicit method.

*)
| ARK436L2SA_ERK_6_3_4 (*

ARK-6-3-4 ERK method.

*)
| SayfyAburub_6_3_4 (*

From Sayfy and Aburub 2002.

*)
| CashKarp_6_4_5 (*

Default 5th order explicit method.

*)
| Fehlberg_6_4_5 (*

From Fehlberg 1969.

*)
| DormandPrince_7_4_5 (*

From Dormand Prince 1980.

*)
| ARK548L2SA_ERK_8_4_5 (*

ARK-8-4-5 ERK method.

*)
| Verner_8_5_6 (*

Default 6th order explicit method.

*)
| Fehlberg_13_7_8 (*

Default 8th order explicit method.

*)
| Knoth_Wolke_3_3 (*

Default 3rd order slow and fast method (Sundials >= 4.0.0).

*)
| ARK437L2SA_ERK_7_3_4 (*

ARK-7-3-4 ERK method. (Sundials >= 5.0.0).

*)
| ARK548L2SAb_ERK_8_4_5 (*

ARK-8-4-5b ERK method. (Sundials >= 5.0.0).

*)

Explicit Butcher tables

type dirk_table = 
| SDIRK_2_1_2 (*

Default 2nd order implicit method.

*)
| Billington_3_3_2 (*

From Billington 1983.

*)
| TRBDF2_3_3_2 (*

From Billington 1985.

*)
| Kvaerno_4_2_3 (*

From Kvaerno 2004.

*)
| ARK324L2SA_DIRK_4_2_3 (*

Default 3rd order implicit method and the implicit portion of the default 3rd order additive method.

*)
| Cash_5_2_4 (*

From Cash 1979.

*)
| Cash_5_3_4 (*

From Cash 1979.

*)
| SDIRK_5_3_4 (*

Default 4th order implicit method.

*)
| Kvaerno_5_3_4 (*

From Kvaerno 2004.

*)
| ARK436L2SA_DIRK_6_3_4 (*

ARK-6-3-4 ESDIRK method

*)
| Kvaerno_7_4_5 (*

From Kvaerno 2004.

*)
| ARK548L2SA_DIRK_8_4_5 (*

ARK-8-4-5 ESDIRK method.

*)
| ARK437L2SA_DIRK_7_3_4 (*

ARK-7-3-4 ESDIRK method.

*)
| ARK548L2SAb_DIRK_8_4_5 (*

ARK-8-4-5b ESDIRK method.

*)

Implicit Butcher tables

type ark_table = 
| ARK_4_2_3 (*

3rd-order pair combining BogackiShampine_4_2_3 and ARK_4_2_3_Implicit.

*)
| ARK_6_3_4 (*

4th-order pair combining ARK_6_3_4_Explicit and ARK_6_3_4_Implicit.

*)
| ARK_8_4_5 (*

5th-order pair combining ARK_8_4_5_Explicit and ARK_8_4_5_Implicit.

*)

Additive Butcher tables

val load_erk : erk_table -> t

Retrieves an explicit Butcher table.

val load_dirk : dirk_table -> t

Retrieves a diagonally-implicit Butcher table.

val write : ?logfile:Sundials.Logfile.t -> t -> unit

Writes a Butcher table on the standard output (or given file).

exception ButcherTableCheckFailed

Indicates that a check on the analytic order of accuracy failed.

val check_order : ?outfile:Sundials.Logfile.t ->
t -> int * int option * bool

Determines the analytic order of accuracy for a Butcher table. The analytic (necessary) conditions are checked up to order 6. For orders greater than 6, the Butcher simplifying (sufficient) assumptions are used. In the call, (q, p, warn) = check_order bt,

The logfile, if given, is used to print results.

val check_ark_order : ?outfile:Sundials.Logfile.t ->
t -> t -> int * int option * bool

Determines the analytic order of accuracy for a pair of Butcher tables. The analytic (necessary) conditions are checked up to order 6. For orders greater than 6, the Butcher simplifying (sufficient) assumptions are used. In the call, (q, p, warn) = check_order b1 b2,

The logfile, if given, is used to print results.