sig
type 'd sensresfn_args = {
t : float;
y : 'd;
y' : 'd;
res : 'd;
s : 'd array;
s' : 'd array;
tmp : 'd Ida.triple;
}
type 'd sensresfn = 'd Idas.Sensitivity.sensresfn_args -> 'd array -> unit
type sens_method = Simultaneous | Staggered
type sens_params = {
pvals : Sundials.RealArray.t option;
pbar : Sundials.RealArray.t option;
plist : int array option;
}
type ('d, 'k) tolerance =
SStolerances of float * Sundials.RealArray.t
| SVtolerances of float * ('d, 'k) Nvector.t array
| EEtolerances
val init :
('d, 'k) Ida.session ->
('d, 'k) Idas.Sensitivity.tolerance ->
Idas.Sensitivity.sens_method ->
?sens_nlsolver:('d, 'k, ('d, 'k) Ida.session, [ `Sens ])
Sundials.NonlinearSolver.t ->
?sens_params:Idas.Sensitivity.sens_params ->
?fs:'d Idas.Sensitivity.sensresfn ->
('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t array -> unit
val reinit :
('d, 'k) Ida.session ->
Idas.Sensitivity.sens_method ->
?sens_nlsolver:('d, 'k, ('d, 'k) Ida.session, [ `Sens ])
Sundials.NonlinearSolver.t ->
('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t array -> unit
val toggle_off : ('d, 'k) Ida.session -> unit
module Quadrature :
sig
type 'd quadsensrhsfn_args = {
t : float;
y : 'd;
y' : 'd;
s : 'd array;
s' : 'd array;
q : 'd;
tmp : 'd Ida.triple;
}
type 'd quadsensrhsfn =
'd Idas.Sensitivity.Quadrature.quadsensrhsfn_args ->
'd array -> unit
val init :
('d, 'k) Ida.session ->
?fqs:'d Idas.Sensitivity.Quadrature.quadsensrhsfn ->
('d, 'k) Nvector.t array -> unit
val reinit : ('d, 'k) Ida.session -> ('d, 'k) Nvector.t array -> unit
type ('d, 'k) tolerance =
NoStepSizeControl
| SStolerances of float * Sundials.RealArray.t
| SVtolerances of float * ('d, 'k) Nvector.t array
| EEtolerances
val set_tolerances :
('d, 'k) Ida.session ->
('d, 'k) Idas.Sensitivity.Quadrature.tolerance -> unit
val get : ('d, 'k) Ida.session -> ('d, 'k) Nvector.t array -> float
val get1 : ('d, 'k) Ida.session -> ('d, 'k) Nvector.t -> int -> float
val get_dky :
('d, 'k) Ida.session ->
('d, 'k) Nvector.t array -> float -> int -> unit
val get_dky1 :
('d, 'k) Ida.session ->
('d, 'k) Nvector.t -> float -> int -> int -> unit
val get_num_rhs_evals : ('d, 'k) Ida.session -> int
val get_num_err_test_fails : ('d, 'k) Ida.session -> int
val get_err_weights :
('d, 'k) Ida.session -> ('d, 'k) Nvector.t array -> unit
val get_stats : ('d, 'k) Ida.session -> int * int
exception QuadSensNotInitialized
exception QuadSensRhsFuncFailure
exception FirstQuadSensRhsFuncFailure
exception RepeatedQuadSensRhsFuncFailure
end
val calc_ic_ya_yd' :
('d, 'k) Ida.session ->
?y:('d, 'k) Nvector.t ->
?y':('d, 'k) Nvector.t ->
?s:('d, 'k) Nvector.t array ->
?s':('d, 'k) Nvector.t array ->
?varid:('d, 'k) Nvector.t -> float -> unit
val calc_ic_y :
('d, 'k) Ida.session ->
?y:('d, 'k) Nvector.t -> ?s:('d, 'k) Nvector.t array -> float -> unit
val get : ('d, 'k) Ida.session -> ('d, 'k) Nvector.t array -> float
val get_dky :
('d, 'k) Ida.session -> ('d, 'k) Nvector.t array -> float -> int -> unit
val get1 : ('d, 'k) Ida.session -> ('d, 'k) Nvector.t -> int -> float
val get_dky1 :
('d, 'k) Ida.session -> ('d, 'k) Nvector.t -> float -> int -> int -> unit
val set_tolerances :
('d, 'k) Ida.session -> ('d, 'k) Idas.Sensitivity.tolerance -> unit
val set_err_con : ('d, 'k) Ida.session -> bool -> unit
type dq_method = DQCentered | DQForward
val set_dq_method :
('d, 'k) Ida.session -> Idas.Sensitivity.dq_method -> float -> unit
val set_max_nonlin_iters : ('d, 'k) Ida.session -> int -> unit
val get_num_res_evals : ('d, 'k) Ida.session -> int
val get_num_res_evals_sens : ('d, 'k) Ida.session -> int
val get_num_err_test_fails : ('d, 'k) Ida.session -> int
val get_num_lin_solv_setups : ('d, 'k) Ida.session -> int
type sensitivity_stats = {
num_sens_evals : int;
num_res_evals : int;
num_err_test_fails : int;
num_lin_solv_setups : int;
}
val get_stats : ('d, 'k) Ida.session -> Idas.Sensitivity.sensitivity_stats
val get_err_weights :
('d, 'k) Ida.session -> ('d, 'k) Nvector.t array -> unit
val get_num_nonlin_solv_iters : ('d, 'k) Ida.session -> int
val get_num_nonlin_solv_conv_fails : ('d, 'k) Ida.session -> int
val get_nonlin_solv_stats : ('d, 'k) Ida.session -> int * int
val get_current_y_sens : ('d, 'k) Idas.session -> 'd array
val get_current_yp_sens : ('d, 'k) Idas.session -> 'd array
type 'd nonlin_system_data = {
tn : float;
yyspred : 'd array;
ypspred : 'd array;
yysn : 'd array;
ypsn : 'd array;
cj : float;
}
val get_nonlin_system_data :
('d, 'k) Idas.session -> 'd Idas.Sensitivity.nonlin_system_data
val compute_y_sens :
('d, 'k) Idas.session ->
ycor:('d, 'k) Nvector.t array -> y:('d, 'k) Nvector.t array -> unit
val compute_yp_sens :
('d, 'k) Idas.session ->
ycor:('d, 'k) Nvector.t array -> yp:('d, 'k) Nvector.t array -> unit
exception SensNotInitialized
exception SensResFuncFailure
exception RepeatedSensResFuncFailure
exception BadSensIdentifier
end