sig
type ('data, 'kind) solver
type 'a serial_solver =
(Nvector_serial.data, 'a) Arkode.ARKStep.Mass.solver
constraint 'a = [> Nvector_serial.kind ]
module Dls :
sig
val dense :
?context:Sundials.Context.t ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
'a Sundials.Matrix.dense ->
(Sundials.Matrix.Dense.t, 'a, [ `Dls ])
Sundials_LinearSolver.serial_t
val lapack_dense :
?context:Sundials.Context.t ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
'a Sundials.Matrix.dense ->
(Sundials.Matrix.Dense.t, 'a, [ `Dls ])
Sundials_LinearSolver.serial_t
val band :
?context:Sundials.Context.t ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
'a Sundials.Matrix.band ->
(Sundials.Matrix.Band.t, 'a, [ `Dls ]) Sundials_LinearSolver.serial_t
val lapack_band :
?context:Sundials.Context.t ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
'a Sundials.Matrix.band ->
(Sundials.Matrix.Band.t, 'a, [ `Dls ]) Sundials_LinearSolver.serial_t
module Klu :
sig
type ordering =
Sundials_LinearSolver_impl.Klu.ordering =
Amd
| ColAmd
| Natural
val make :
?context:Sundials.Context.t ->
?ordering:ordering ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, [ `Dls | `Klu ])
Sundials_LinearSolver.serial_t
val reinit :
('s Sundials.Matrix.Sparse.t, [> Nvector_serial.kind ] as 'a,
[> `Klu ])
Sundials_LinearSolver.serial_t ->
('s, 'a) Sundials.Matrix.sparse -> ?nnz:int -> unit -> unit
val set_ordering :
('s Sundials.Matrix.Sparse.t, [> Nvector_serial.kind ],
[> `Klu ])
Sundials_LinearSolver.serial_t -> ordering -> unit
end
val klu :
?context:Sundials.Context.t ->
?ordering:Klu.ordering ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, [ `Dls | `Klu ])
Sundials_LinearSolver.serial_t
module Superlumt :
sig
type ordering =
Sundials_LinearSolver_impl.Superlumt.ordering =
Natural
| MinDegreeProd
| MinDegreeSum
| ColAmd
val make :
?context:Sundials.Context.t ->
?ordering:ordering ->
nthreads:int ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, [ `Dls | `Slu ])
Sundials_LinearSolver.serial_t
val set_ordering :
('s Sundials.Matrix.Sparse.t, [> Nvector_serial.kind ],
[> `Slu ])
Sundials_LinearSolver.serial_t -> ordering -> unit
end
val superlumt :
?context:Sundials.Context.t ->
?ordering:Superlumt.ordering ->
nthreads:int ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, [> `Dls | `Slu ])
Sundials_LinearSolver.serial_t
type 'm mass_fn = float -> Sundials.RealArray.t triple -> 'm -> unit
val solver :
'm Arkode.ARKStep.Mass.Dls.mass_fn ->
bool ->
('m, Sundials.RealArray.t, [> Nvector_serial.kind ] as 'a, [> `Dls ])
Sundials.LinearSolver.t -> 'a Arkode.ARKStep.Mass.serial_solver
val get_work_space :
[> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int * int
val get_num_setups :
[> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
val get_num_mult_setups :
[> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
val get_num_solves :
[> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
val get_num_mult :
[> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
end
module Spils :
sig
type gramschmidt_type =
Sundials_LinearSolver_impl.Iterative.gramschmidt_type =
ModifiedGS
| ClassicalGS
val spbcgs :
?context:Sundials.Context.t ->
?maxl:int ->
('d, 'k) Nvector.t ->
('m, 'd, 'k, [ `Iter | `Spbcgs ]) Sundials_LinearSolver.t
val spfgmr :
?context:Sundials.Context.t ->
?maxl:int ->
?max_restarts:int ->
?gs_type:gramschmidt_type ->
('d, 'k) Nvector.t ->
('m, 'd, 'k, [ `Iter | `Spfgmr ]) Sundials_LinearSolver.t
val spgmr :
?context:Sundials.Context.t ->
?maxl:int ->
?max_restarts:int ->
?gs_type:gramschmidt_type ->
('d, 'k) Nvector.t ->
('m, 'd, 'k, [ `Iter | `Spgmr ]) Sundials_LinearSolver.t
val sptfqmr :
?context:Sundials.Context.t ->
?maxl:int ->
('d, 'k) Nvector.t ->
('m, 'd, 'k, [ `Iter | `Sptfqmr ]) Sundials_LinearSolver.t
val pcg :
?context:Sundials.Context.t ->
?maxl:int ->
('d, 'k) Nvector.t ->
('m, 'd, 'k, [ `Iter | `Pcg ]) Sundials_LinearSolver.t
module Algorithms :
sig
val qr_fact :
int ->
Sundials.RealArray2.t -> Sundials.RealArray.t -> bool -> unit
val qr_sol :
int ->
Sundials.RealArray2.t ->
Sundials.RealArray.t -> Sundials.RealArray.t -> unit
val modified_gs :
('d, 'k) Nvector.t array ->
Sundials.RealArray2.t -> int -> int -> float
val classical_gs :
('d, 'k) Nvector.t array ->
Sundials.RealArray2.t ->
int ->
int -> Sundials.RealArray.t -> ('d, 'k) Nvector.t array -> float
end
val set_maxl :
('m, 'd, 'k, [< `Iter | `Pcg | `Spbcgs | `Sptfqmr ])
Sundials_LinearSolver.t -> int -> unit
val set_gs_type :
('m, 'd, 'k, [< `Iter | `Spfgmr | `Spgmr ]) Sundials_LinearSolver.t ->
gramschmidt_type -> unit
val set_max_restarts :
('m, 'd, 'k, [< `Iter | `Spfgmr | `Spgmr ]) Sundials_LinearSolver.t ->
int -> unit
type preconditioning_type =
Sundials_LinearSolver_impl.Iterative.preconditioning_type =
PrecNone
| PrecLeft
| PrecRight
| PrecBoth
val set_prec_type :
('m, 'd, 'k, [> `Iter ]) Sundials_LinearSolver.t ->
preconditioning_type -> unit
val set_info_file :
('m, 'd, 'k, [> `Iter ]) Sundials_LinearSolver.t ->
?print_level:bool -> Sundials.Logfile.t -> unit
val set_print_level :
('m, 'd, 'k, [> `Iter ]) Sundials_LinearSolver.t -> bool -> unit
type 'd prec_solve_arg = { rhs : 'd; delta : float; left : bool; }
type 'd prec_solve_fn =
float -> 'd Arkode.ARKStep.Mass.Spils.prec_solve_arg -> 'd -> unit
type 'd prec_setup_fn = float -> unit
type ('d, 'k) preconditioner
val prec_none : ('d, 'k) Arkode.ARKStep.Mass.Spils.preconditioner
val prec_left :
?setup:'d Arkode.ARKStep.Mass.Spils.prec_setup_fn ->
'd Arkode.ARKStep.Mass.Spils.prec_solve_fn ->
('d, 'k) Arkode.ARKStep.Mass.Spils.preconditioner
val prec_right :
?setup:'d Arkode.ARKStep.Mass.Spils.prec_setup_fn ->
'd Arkode.ARKStep.Mass.Spils.prec_solve_fn ->
('d, 'k) Arkode.ARKStep.Mass.Spils.preconditioner
val prec_both :
?setup:'d Arkode.ARKStep.Mass.Spils.prec_setup_fn ->
'd Arkode.ARKStep.Mass.Spils.prec_solve_fn ->
('d, 'k) Arkode.ARKStep.Mass.Spils.preconditioner
type mass_times_setup_fn = float -> unit
type 'd mass_times_vec_fn = float -> 'd -> 'd -> unit
val solver :
('m, 'd, 'k, [> `Iter ]) Sundials.LinearSolver.t ->
?mass_times_setup:Arkode.ARKStep.Mass.Spils.mass_times_setup_fn ->
'd Arkode.ARKStep.Mass.Spils.mass_times_vec_fn ->
bool ->
('d, 'k) Arkode.ARKStep.Mass.Spils.preconditioner ->
('d, 'k) Arkode.ARKStep.Mass.solver
val set_eps_lin : ('d, 'k) Arkode.ARKStep.session -> float -> unit
val set_ls_norm_factor :
('d, 'k) Arkode.ARKStep.session -> float -> unit
val get_work_space : ('d, 'k) Arkode.ARKStep.session -> int * int
val get_num_lin_iters : ('d, 'k) Arkode.ARKStep.session -> int
val get_num_conv_fails : ('d, 'k) Arkode.ARKStep.session -> int
val get_num_mtsetups : ('d, 'k) Arkode.ARKStep.session -> int
val get_num_mass_mult : ('d, 'k) Arkode.ARKStep.session -> int
val get_num_prec_evals : ('d, 'k) Arkode.ARKStep.session -> int
val get_num_prec_solves : ('d, 'k) Arkode.ARKStep.session -> int
val set_preconditioner :
('d, 'k) Arkode.ARKStep.session ->
?setup:'d Arkode.ARKStep.Mass.Spils.prec_setup_fn ->
'd Arkode.ARKStep.Mass.Spils.prec_solve_fn -> unit
val set_times :
('d, 'k) Arkode.ARKStep.session ->
?mass_times_setup:Arkode.ARKStep.Mass.Spils.mass_times_setup_fn ->
'd Arkode.ARKStep.Mass.Spils.mass_times_vec_fn -> unit
end
val matrix_embedded_solver :
(unit, 'data, 'kind, [> `MatE ]) Sundials.LinearSolver.t ->
('data, 'kind) Arkode.ARKStep.linear_solver
end