sig
type 'd sensrhsfn_args = {
t : float;
y : 'd;
y' : 'd;
tmp : 'd Cvode.double;
}
type 'd sensrhsfn_all =
'd Cvodes.Sensitivity.sensrhsfn_args -> 'd array -> 'd array -> unit
and 'd sensrhsfn1 =
int -> 'd Cvodes.Sensitivity.sensrhsfn_args -> 'd -> 'd -> unit
type 'd sensrhsfn =
AllAtOnce of 'd Cvodes.Sensitivity.sensrhsfn_all option
| OneByOne of 'd Cvodes.Sensitivity.sensrhsfn1 option
type ('d, 'k) sens_method =
Simultaneous of
('d, 'k, ('d, 'k) Cvode.session, [ `Sens ])
Sundials.NonlinearSolver.t option
| Staggered of
('d, 'k, ('d, 'k) Cvode.session, [ `Sens ])
Sundials.NonlinearSolver.t option
| Staggered1 of
('d, 'k, ('d, 'k) Cvode.session, [ `Nvec ])
Sundials.NonlinearSolver.t option
type sens_params = {
pvals : Sundials.RealArray.t option;
pbar : Sundials.RealArray.t option;
plist : int array option;
}
val no_sens_params : Cvodes.Sensitivity.sens_params
type ('d, 'k) tolerance =
SStolerances of float * Sundials.RealArray.t
| SVtolerances of float * ('d, 'k) Nvector.t array
| EEtolerances
val init :
('d, 'k) Cvode.session ->
('d, 'k) Cvodes.Sensitivity.tolerance ->
('d, 'k) Cvodes.Sensitivity.sens_method ->
?sens_params:Cvodes.Sensitivity.sens_params ->
'd Cvodes.Sensitivity.sensrhsfn -> ('d, 'k) Nvector.t array -> unit
val reinit :
('d, 'k) Cvode.session ->
('d, 'k) Cvodes.Sensitivity.sens_method ->
('d, 'k) Nvector.t array -> unit
val toggle_off : ('d, 'k) Cvode.session -> unit
val turn_off : ('d, 'k) Cvode.session -> unit
module Quadrature :
sig
type 'd quadsensrhsfn_args = {
t : float;
y : 'd;
s : 'd array;
yq' : 'd;
tmp : 'd Cvode.double;
}
type 'd quadsensrhsfn =
'd Cvodes.Sensitivity.Quadrature.quadsensrhsfn_args ->
'd array -> unit
val init :
('d, 'k) Cvode.session ->
?fqs:'d Cvodes.Sensitivity.Quadrature.quadsensrhsfn ->
('d, 'k) Nvector.t array -> unit
val reinit : ('d, 'k) Cvode.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) Cvode.session ->
('d, 'k) Cvodes.Sensitivity.Quadrature.tolerance -> unit
val get : ('d, 'k) Cvode.session -> ('d, 'k) Nvector.t array -> float
val get1 : ('d, 'k) Cvode.session -> ('d, 'k) Nvector.t -> int -> float
val get_dky :
('d, 'k) Cvode.session ->
('d, 'k) Nvector.t array -> float -> int -> unit
val get_dky1 :
('d, 'k) Cvode.session ->
('d, 'k) Nvector.t -> float -> int -> int -> unit
val get_num_rhs_evals : ('d, 'k) Cvode.session -> int
val get_num_err_test_fails : ('d, 'k) Cvode.session -> int
val get_err_weights :
('d, 'k) Cvode.session -> ('d, 'k) Nvector.t array -> unit
val get_stats : ('d, 'k) Cvode.session -> int * int
exception QuadSensNotInitialized
exception QuadSensRhsFuncFailure
exception FirstQuadSensRhsFuncFailure
exception RepeatedQuadSensRhsFuncFailure
exception UnrecoverableQuadSensRhsFuncFailure
end
val get : ('d, 'k) Cvode.session -> ('d, 'k) Nvector.t array -> float
val get_dky :
('d, 'k) Cvode.session ->
('d, 'k) Nvector.t array -> float -> int -> unit
val get1 : ('d, 'k) Cvode.session -> ('d, 'k) Nvector.t -> int -> float
val get_dky1 :
('d, 'k) Cvode.session ->
('d, 'k) Nvector.t -> float -> int -> int -> unit
val set_tolerances :
('d, 'k) Cvode.session -> ('d, 'k) Cvodes.Sensitivity.tolerance -> unit
val set_err_con : ('d, 'k) Cvode.session -> bool -> unit
type dq_method = DQCentered | DQForward
val set_dq_method :
('d, 'k) Cvode.session -> Cvodes.Sensitivity.dq_method -> float -> unit
val set_max_nonlin_iters : ('d, 'k) Cvode.session -> int -> unit
val get_num_rhs_evals : ('d, 'k) Cvode.session -> int
val get_num_rhs_evals_sens : ('d, 'k) Cvode.session -> int
val get_num_err_test_fails : ('d, 'k) Cvode.session -> int
val get_num_lin_solv_setups : ('d, 'k) Cvode.session -> int
type sensitivity_stats = {
num_sens_evals : int;
num_rhs_evals : int;
num_err_test_fails : int;
num_lin_solv_setups : int;
}
val get_stats :
('d, 'k) Cvode.session -> Cvodes.Sensitivity.sensitivity_stats
val get_err_weights :
('d, 'k) Cvode.session -> ('d, 'k) Nvector.t array -> unit
val get_num_nonlin_solv_iters : ('d, 'k) Cvode.session -> int
val get_num_nonlin_solv_conv_fails : ('d, 'k) Cvode.session -> int
val get_nonlin_solv_stats : ('d, 'k) Cvode.session -> int * int
val get_num_stgr_nonlin_solv_iters :
('d, 'k) Cvode.session -> Sundials.LintArray.t -> unit
val get_num_stgr_nonlin_solv_conv_fails :
('d, 'k) Cvode.session -> Sundials.LintArray.t -> unit
val get_current_state_sens : ('d, 'k) Cvodes.session -> 'd array
type 'd nonlin_system_data = {
tn : float;
yspred : 'd array;
ysn : 'd array;
gamma : float;
rls1 : float;
zns1 : 'd array;
}
val get_nonlin_system_data :
('d, 'k) Cvodes.session -> 'd Cvodes.Sensitivity.nonlin_system_data
val compute_state :
('d, 'k) Cvodes.session ->
('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t array -> unit
val compute_state1 :
('d, 'k) Cvodes.session ->
int -> ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val get_current_sens_solve_index : ('d, 'k) Cvodes.session -> int
exception SensNotInitialized
exception SensRhsFuncFailure
exception FirstSensRhsFuncFailure
exception RepeatedSensRhsFuncFailure
exception UnrecoverableSensRhsFuncFailure
exception BadSensIdentifier
end