Module Arkode.MRIStep.Coupling

module Coupling: sig .. end

Coupling coefficients between fast and slow time scales.


type t 

Represents a set of coupling coefficients. The coupling from slow to fast time scales is encoded as a vector of slow “stage time” abscissae, $c^S \in \mathbb{R}^{s+1}$ and a set of coupling matrices $\Gamma^{{k}} \in \mathbb{R}^{(s+1)\times(s+1)} $ . The individual fields can be accessed using the functions below.

val nmat : t -> int

The number of $\Gamma^{{k}}$ coupling matrices.

val stages : t -> int

The number of slow abscissae ($s + 1$ ).

val method_order : t -> int

The accuracy order of the MRI method.

val embedding_order : t -> int

The accuracy order of the embedding.

val explicit_coupling_matrices : t -> Sundials.RealArray.t array array option

The set of explicit coupling matrices $\Omega^{{k}}$ as nmat * stages * stages floats.

val implicit_coupling_matrices : t -> Sundials.RealArray.t array array option

The set of implicit coupling matrices $\Gamma^{{k}}$ as nmat * stages * stages floats.

val abscissae : t -> Sundials.RealArray.t

An array of slow abscissae $c^S$ . The array has length stages.

val make : method_order:int ->
embedding_order:int ->
?explicit:Sundials.RealArray.t array array ->
?implicit:Sundials.RealArray.t array array ->
Sundials.RealArray.t -> t

Create a set of coupling coefficients. The values of nmat and stages are obtained from the array lengths.

At least one of explicit or implicit must be provided. The explicit coupling matrix is not used in Sundials < 6.0.0.

type coupling_table = 
| KW3 (*

Explicit table of order 3.

*)
| GARK_ERK33a (*

Explicit table of order 3. (Sundials >= 6.0.0)

*)
| GARK_ERK45a (*

Explicit table of order 4.

*)
| GARK_IRK21a (*

Diagonally-implicit, solve-decoupled MRI-GARK coupling table of order 2 with 1 implicit solve.

*)
| GARK_ESDIRK34a (*

Diagonally-Implicit, solve-decoupled MRI-GARK coupling table of order 4 with 3 implicit solves.

*)
| GARK_ESDIRK46a (*

Diagonnaly-implicit, solve-decoupled MRI-GARK coupling table of order 4 with 5 implicit solves. (Sundials >= 6.0.0)

*)
| IMEX_GARK3a (*

Diagonally-implicit, solve-decoupled IMEX-MRI-GARK coupling table of order 3 with 2 implicit solves. (Sundials >= 6.0.0)

*)
| IMEX_GARK3b (*

Diagonally-implicit, solve-decoupled IMEX-MRI-GARK coupling table of order 3 with 2 implicit solves. (Sundials >= 6.0.0)

*)
| IMEX_GARK4 (*

Diagonally-implicit, solve-decoupled IMEX-MRI-GARK coupling table of order 4 with 5 implicit solves. (Sundials >= 6.0.0)

*)

Available coupling tables.

val load_table : coupling_table -> t

Retrieves a copy of a specific coupling table.

val mis_to_mri : method_order:int ->
embedding_order:int -> Arkode.ButcherTable.t -> t

Create a new coupling table from a slow Butcher table.

val copy : t -> t

Create a copy of a given coupling table.

val space : t -> int * int

Return a coupling table's real and integer workspace sizes.

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

Write a coupling table on the standard output (or given file).