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;
gamma : float;
delta : float;
left : bool;
}
type 'd prec_solve_fn =
(unit, 'd) Cvodes.Adjoint.jacobian_arg ->
'd Cvodes.Adjoint.Spils.prec_solve_arg -> 'd -> unit
type 'd prec_solve_fn_with_sens =
(unit, 'd) Cvodes.Adjoint.jacobian_arg ->
'd Cvodes.Adjoint.Spils.prec_solve_arg -> 'd array -> 'd -> unit
type 'd prec_setup_fn =
(unit, 'd) Cvodes.Adjoint.jacobian_arg -> bool -> float -> bool
type 'd prec_setup_fn_with_sens =
(unit, 'd) Cvodes.Adjoint.jacobian_arg ->
'd array -> bool -> float -> bool
type ('d, 'k) preconditioner =
('d, 'k) Cvode_impl.AdjointTypes.SpilsTypes.preconditioner
val prec_none : ('d, 'k) Cvodes.Adjoint.Spils.preconditioner
val prec_left :
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn ->
'd Cvodes.Adjoint.Spils.prec_solve_fn ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner
val prec_left_with_sens :
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn_with_sens ->
'd Cvodes.Adjoint.Spils.prec_solve_fn_with_sens ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner
val prec_right :
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn ->
'd Cvodes.Adjoint.Spils.prec_solve_fn ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner
val prec_right_with_sens :
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn_with_sens ->
'd Cvodes.Adjoint.Spils.prec_solve_fn_with_sens ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner
val prec_both :
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn ->
'd Cvodes.Adjoint.Spils.prec_solve_fn ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner
val prec_both_with_sens :
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn_with_sens ->
'd Cvodes.Adjoint.Spils.prec_solve_fn_with_sens ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner
module Banded :
sig
type bandrange = { mupper : int; mlower : int; }
val prec_left :
Cvodes.Adjoint.Spils.Banded.bandrange ->
(Nvector_serial.data, [> Nvector_serial.kind ])
Cvodes.Adjoint.Spils.preconditioner
val prec_right :
Cvodes.Adjoint.Spils.Banded.bandrange ->
(Nvector_serial.data, [> Nvector_serial.kind ])
Cvodes.Adjoint.Spils.preconditioner
val prec_both :
Cvodes.Adjoint.Spils.Banded.bandrange ->
(Nvector_serial.data, [> Nvector_serial.kind ])
Cvodes.Adjoint.Spils.preconditioner
val get_work_space :
[> Nvector_serial.kind ] Cvodes.Adjoint.serial_bsession -> int * int
val get_num_rhs_evals :
[> Nvector_serial.kind ] Cvodes.Adjoint.serial_bsession -> int
end
type 'd jac_times_setup_fn_no_sens =
(unit, 'd) Cvodes.Adjoint.jacobian_arg -> unit
type 'd jac_times_setup_fn_with_sens =
(unit, 'd) Cvodes.Adjoint.jacobian_arg -> 'd array -> unit
type 'd jac_times_vec_fn_no_sens =
('d, 'd) Cvodes.Adjoint.jacobian_arg -> 'd -> 'd -> unit
type 'd jac_times_vec_fn_with_sens =
('d, 'd) Cvodes.Adjoint.jacobian_arg -> 'd array -> 'd -> 'd -> unit
type 'd jac_times_vec_fn =
NoSens of 'd Cvodes.Adjoint.Spils.jac_times_setup_fn_no_sens option *
'd Cvodes.Adjoint.Spils.jac_times_vec_fn_no_sens
| WithSens of
'd Cvodes.Adjoint.Spils.jac_times_setup_fn_with_sens option *
'd Cvodes.Adjoint.Spils.jac_times_vec_fn_with_sens
val solver :
('m, 'd, 'k, 'f) Sundials.LinearSolver.t ->
?jac_times_vec:'d Cvodes.Adjoint.Spils.jac_times_vec_fn ->
?jac_times_rhs:'d Cvode.rhsfn ->
('d, 'k) Cvodes.Adjoint.Spils.preconditioner ->
('d, 'k) Cvodes.Adjoint.linear_solver
val set_jac_eval_frequency :
('d, 'k) Cvodes.Adjoint.bsession -> int -> unit
val set_lsetup_frequency : ('d, 'k) Cvodes.Adjoint.bsession -> int -> unit
val set_eps_lin : ('d, 'k) Cvodes.Adjoint.bsession -> float -> unit
val set_ls_norm_factor : ('d, 'k) Cvodes.Adjoint.bsession -> float -> unit
val set_linear_solution_scaling :
('d, 'k) Cvodes.Adjoint.bsession -> bool -> unit
val get_work_space : ('d, 'k) Cvodes.Adjoint.bsession -> int * int
val get_num_lin_iters : ('d, 'k) Cvodes.Adjoint.bsession -> int
val get_num_lin_conv_fails : ('d, 'k) Cvodes.Adjoint.bsession -> int
val get_num_prec_evals : ('d, 'k) Cvodes.Adjoint.bsession -> int
val get_num_prec_solves : ('d, 'k) Cvodes.Adjoint.bsession -> int
val get_num_jtsetup_evals : ('d, 'k) Cvodes.Adjoint.bsession -> int
val get_num_jtimes_evals : ('d, 'k) Cvodes.Adjoint.bsession -> int
val get_num_lin_rhs_evals : ('d, 'k) Cvodes.Adjoint.bsession -> int
val set_preconditioner :
('d, 'k) Cvodes.Adjoint.bsession ->
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn ->
'd Cvodes.Adjoint.Spils.prec_solve_fn -> unit
val set_preconditioner_with_sens :
('d, 'k) Cvodes.Adjoint.bsession ->
?setup:'d Cvodes.Adjoint.Spils.prec_setup_fn_with_sens ->
'd Cvodes.Adjoint.Spils.prec_solve_fn_with_sens -> unit
val set_jac_times :
('d, 'k) Cvodes.Adjoint.bsession ->
'd Cvodes.Adjoint.Spils.jac_times_vec_fn -> unit
val clear_jac_times : ('d, 'k) Cvodes.Adjoint.bsession -> unit
end