sig
type ('data, 'kind, 's, 'v) t =
('data, 'kind, 's, 'v) Sundials_NonlinearSolver_impl.nonlinear_solver
module Senswrapper :
sig
type ('d, 'k) t = ('d, 'k) Sundials_NonlinearSolver_impl.Senswrapper.t
val data : ('d, 'k) Sundials_NonlinearSolver.Senswrapper.t -> 'd array
end
type nonlinear_solver_type = RootFind | FixedPoint
val get_type :
('d, 'k, 's, 'v) Sundials_NonlinearSolver.t ->
Sundials_NonlinearSolver.nonlinear_solver_type
val init : ('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> unit
val setup :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
y:('d, 'k) Nvector.t -> 's -> unit
val solve :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
y0:('d, 'k) Nvector.t ->
ycor:('d, 'k) Nvector.t ->
w:('d, 'k) Nvector.t -> float -> bool -> 's -> unit
type ('nv, 's) sysfn = 'nv -> 'nv -> 's -> unit
val set_sys_fn :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
('d, 's) Sundials_NonlinearSolver.sysfn -> unit
type 's lsetupfn = bool -> 's -> bool
val set_lsetup_fn :
('d, 'k, 's, 'v) Sundials_NonlinearSolver.t ->
's Sundials_NonlinearSolver.lsetupfn -> unit
type ('nv, 's) lsolvefn = 'nv -> 's -> unit
val set_lsolve_fn :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
('d, 's) Sundials_NonlinearSolver.lsolvefn -> unit
type convtest = Success | Continue | Recover
type ('nv, 's) convtestfn' =
'nv -> 'nv -> float -> 'nv -> 's -> Sundials_NonlinearSolver.convtest
type 's convtest_callback = {
f :
'd1 'k1 't2 'd2 'k2.
('d1, 'k1, 't2, [ `Nvec ]) Sundials_NonlinearSolver.t ->
(('d2, 'k2) Nvector.t, 's) Sundials_NonlinearSolver.convtestfn';
} [@@unboxed]
type 's convtest_callback_sens = {
f :
'd1 'k1 't2 'd2 'k2.
('d1, 'k1, 't2, [ `Sens ]) Sundials_NonlinearSolver.t ->
(('d2, 'k2) Sundials_NonlinearSolver.Senswrapper.t, 's)
Sundials_NonlinearSolver.convtestfn';
} [@@unboxed]
type ('nv, 's, 'v) convtestfn =
CConvTest :
's Sundials_NonlinearSolver.convtest_callback Sundials.cfun ->
('nv, 's, [ `Nvec ]) Sundials_NonlinearSolver.convtestfn
| CSensConvTest :
's Sundials_NonlinearSolver.convtest_callback_sens Sundials.cfun ->
('nv, 's, [ `Sens ]) Sundials_NonlinearSolver.convtestfn
| OConvTest of ('nv, 's) Sundials_NonlinearSolver.convtestfn'
val assert_not_oconvtestfn :
('nv1, 's, [ `Nvec ]) Sundials_NonlinearSolver.convtestfn ->
('nv2, 's, [ `Nvec ]) Sundials_NonlinearSolver.convtestfn
val set_convtest_fn :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
('d, 's, [ `Nvec ]) Sundials_NonlinearSolver.convtestfn -> unit
module Sens :
sig
val setup :
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t ->
y:('d, 'k) Sundials_NonlinearSolver.Senswrapper.t -> 's -> unit
val solve :
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t ->
y0:('d, 'k) Sundials_NonlinearSolver.Senswrapper.t ->
ycor:('d, 'k) Sundials_NonlinearSolver.Senswrapper.t ->
w:('d, 'k) Sundials_NonlinearSolver.Senswrapper.t ->
float -> bool -> 's -> unit
val set_sys_fn :
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t ->
(('d, 'k) Sundials_NonlinearSolver.Senswrapper.t, 's)
Sundials_NonlinearSolver.sysfn -> unit
val set_lsolve_fn :
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t ->
(('d, 'k) Sundials_NonlinearSolver.Senswrapper.t, 's)
Sundials_NonlinearSolver.lsolvefn -> unit
val assert_not_oconvtestfn :
('nv1, 's, [ `Sens ]) Sundials_NonlinearSolver.convtestfn ->
('nv2, 's, [ `Sens ]) Sundials_NonlinearSolver.convtestfn
val set_convtest_fn :
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t ->
(('d, 'k) Sundials_NonlinearSolver.Senswrapper.t, 's, [ `Sens ])
Sundials_NonlinearSolver.convtestfn -> unit
end
val set_max_iters :
('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> int -> unit
val set_info_file :
('d, 'k, 's, 'v) Sundials_NonlinearSolver.t ->
?print_level:bool -> Sundials.Logfile.t -> unit
val set_print_level :
('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> bool -> unit
val get_num_iters : ('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> int
val get_cur_iter : ('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> int
val get_num_conv_fails : ('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> int
module Newton :
sig
val make :
?context:Sundials.Context.t ->
('d, 'k) Nvector.t ->
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t
val make_sens :
?context:Sundials.Context.t ->
int ->
('d, 'k) Nvector.t ->
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t
val get_sys_fn :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
(('d, 'k) Nvector.t, 's) Sundials_NonlinearSolver.sysfn option
end
module FixedPoint :
sig
val make :
?context:Sundials.Context.t ->
?acceleration_vectors:int ->
('d, 'k) Nvector.t ->
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t
val make_sens :
?context:Sundials.Context.t ->
?acceleration_vectors:int ->
int ->
('d, 'k) Nvector.t ->
('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t
val get_sys_fn :
('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t ->
(('d, 'k) Nvector.t, 's) Sundials_NonlinearSolver.sysfn option
val set_damping :
('d, 'k, 's, 'v) Sundials_NonlinearSolver.t -> float -> unit
end
module Custom :
sig
val make :
?init:(unit -> unit) ->
?setup:('d -> 's -> unit) ->
?set_lsetup_fn:('s Sundials_NonlinearSolver.lsetupfn -> unit) ->
?set_lsolve_fn:((('d, 'k) Nvector.t, 's)
Sundials_NonlinearSolver.lsolvefn -> unit) ->
?set_convtest_fn:(('d, 's, [ `Nvec ])
Sundials_NonlinearSolver.convtestfn -> unit) ->
?set_max_iters:(int -> unit) ->
?set_info_file:(Sundials.Logfile.t -> unit) ->
?set_print_level:(int -> unit) ->
?get_num_iters:(unit -> int) ->
?get_cur_iter:(unit -> int) ->
?get_num_conv_fails:(unit -> int) ->
nls_type:Sundials_NonlinearSolver.nonlinear_solver_type ->
solve:('d -> 'd -> 'd -> float -> bool -> 's -> unit) ->
set_sys_fn:((('d, 'k) Nvector.t, 's) Sundials_NonlinearSolver.sysfn ->
unit) ->
?context:Sundials.Context.t ->
unit -> ('d, 'k, 's, [ `Nvec ]) Sundials_NonlinearSolver.t
val make_sens :
?init:(unit -> unit) ->
?setup:(('d, 'k) Sundials_NonlinearSolver.Senswrapper.t -> 's -> unit) ->
?set_lsetup_fn:('s Sundials_NonlinearSolver.lsetupfn -> unit) ->
?set_lsolve_fn:((('d, 'k) Sundials_NonlinearSolver.Senswrapper.t, 's)
Sundials_NonlinearSolver.lsolvefn -> unit) ->
?set_convtest_fn:((('d, 'k) Sundials_NonlinearSolver.Senswrapper.t,
's, [ `Sens ])
Sundials_NonlinearSolver.convtestfn -> unit) ->
?set_max_iters:(int -> unit) ->
?set_info_file:(Sundials.Logfile.t -> unit) ->
?set_print_level:(int -> unit) ->
?get_num_iters:(unit -> int) ->
?get_cur_iter:(unit -> int) ->
?get_num_conv_fails:(unit -> int) ->
nls_type:Sundials_NonlinearSolver.nonlinear_solver_type ->
solve:(('d, 'k) Sundials_NonlinearSolver.Senswrapper.t ->
('d, 'k) Sundials_NonlinearSolver.Senswrapper.t ->
('d, 'k) Sundials_NonlinearSolver.Senswrapper.t ->
float -> bool -> 's -> unit) ->
set_sys_fn:((('d, 'k) Sundials_NonlinearSolver.Senswrapper.t, 's)
Sundials_NonlinearSolver.sysfn -> unit) ->
?context:Sundials.Context.t ->
unit -> ('d, 'k, 's, [ `Sens ]) Sundials_NonlinearSolver.t
end
exception VectorOpError
exception IncorrectUse
exception ExtFail
exception NonlinearSolverInUse
end