sig
type solver_result = Success | RootsFound | StopTimeReached
type step_stats = {
num_steps : int;
actual_init_step : float;
last_step : float;
current_step : float;
current_time : float;
}
type interpolant_type = Hermite | Lagrange
type linearity = Linear of bool | Nonlinear
type 'data error_weight_fun = 'data -> 'data -> unit
type ('data, 'kind) tolerance =
SStolerances of float * float
| SVtolerances of float * ('data, 'kind) Nvector.t
| WFtolerances of 'data error_weight_fun
val default_tolerances : ('data, 'kind) tolerance
type predictor_method =
TrivialPredictor
| MaximumOrderPredictor
| VariableOrderPredictor
| CutoffOrderPredictor
type 'd nonlin_system_data = {
tcur : float;
zpred : 'd;
zi : 'd;
fi : 'd;
gamma : float;
sdata : 'd;
}
type 'd rootsfn = float -> 'd -> Sundials.RealArray.t -> unit
val no_roots : int * 'd rootsfn
type adaptivity_args = {
h1 : float;
h2 : float;
h3 : float;
e1 : float;
e2 : float;
e3 : float;
q : int;
p : int;
}
type 'd adaptivity_fn = float -> 'd -> adaptivity_args -> float
type adaptivity_params = {
ks : (float * float * float) option;
method_order : bool;
}
type 'd adaptivity_method =
PIDcontroller of adaptivity_params
| PIcontroller of adaptivity_params
| Icontroller of adaptivity_params
| ExplicitGustafsson of adaptivity_params
| ImplicitGustafsson of adaptivity_params
| ImExGustafsson of adaptivity_params
| AdaptivityFn of 'd adaptivity_fn
type 'd rhsfn = float -> 'd -> 'd -> unit
type 'd stability_fn = float -> 'd -> float
type 'd resize_fn = 'd -> 'd -> unit
type 'd postprocess_step_fn = float -> 'd -> unit
type 'd triple = 'd * 'd * 'd
type ('t, 'd) jacobian_arg =
('t, 'd) Arkode_impl.jacobian_arg = {
jac_t : float;
jac_y : 'd;
jac_fy : 'd;
jac_tmp : 't;
}
type ('d, 'k) session = ('d, 'k, Arkode.erkstep) Arkode_impl.session
val init :
?context:Sundials.Context.t ->
('data, 'kind) tolerance ->
?order:int ->
'data rhsfn ->
?roots:int * 'data rootsfn ->
float ->
('data, 'kind) Nvector.t -> ('data, 'kind) Arkode.ERKStep.session
val evolve_normal :
('d, 'k) Arkode.ERKStep.session ->
float -> ('d, 'k) Nvector.t -> float * solver_result
val evolve_one_step :
('d, 'k) Arkode.ERKStep.session ->
float -> ('d, 'k) Nvector.t -> float * solver_result
val get_dky :
('d, 'k) Arkode.ERKStep.session ->
('d, 'k) Nvector.t -> float -> int -> unit
val reinit :
('d, 'k) Arkode.ERKStep.session ->
?order:int ->
?roots:int * 'd rootsfn -> float -> ('d, 'k) Nvector.t -> unit
val reset : ('d, 'k) Arkode.ERKStep.session -> float -> ('d, 'k) Nvector.t
val resize :
('d, 'k) Arkode.ERKStep.session ->
?resize_nvec:'d resize_fn ->
('d, 'k) tolerance -> float -> ('d, 'k) Nvector.t -> float -> unit
val set_tolerances :
('d, 'k) Arkode.ERKStep.session -> ('d, 'k) tolerance -> unit
val set_defaults : ('d, 'k) Arkode.ERKStep.session -> unit
val set_diagnostics :
?logfile:Sundials.Logfile.t -> ('d, 'k) Arkode.ERKStep.session -> unit
val set_interpolant_type :
('d, 'k) Arkode.ERKStep.session -> interpolant_type -> unit
val set_interpolant_degree : ('d, 'k) Arkode.ERKStep.session -> int -> unit
val clear_diagnostics : ('d, 'k) Arkode.ERKStep.session -> unit
val set_error_file :
('d, 'k) Arkode.ERKStep.session -> Sundials.Logfile.t -> unit
val set_err_handler_fn :
('d, 'k) Arkode.ERKStep.session ->
(Sundials.Util.error_details -> unit) -> unit
val clear_err_handler_fn : ('d, 'k) Arkode.ERKStep.session -> unit
val set_init_step : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_fixed_step :
('d, 'k) Arkode.ERKStep.session -> float option -> unit
val set_max_num_constr_fails :
('d, 'k) Arkode.ERKStep.session -> int -> unit
val set_max_hnil_warns : ('d, 'k) Arkode.ERKStep.session -> int -> unit
val set_max_num_steps : ('d, 'k) Arkode.ERKStep.session -> int -> unit
val set_max_err_test_fails : ('d, 'k) Arkode.ERKStep.session -> int -> unit
val set_min_step : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_max_step : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_stop_time : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_table :
('d, 'k) Arkode.ERKStep.session -> Arkode.ButcherTable.t -> unit
val set_table_num :
('d, 'k) Arkode.ERKStep.session -> Arkode.ButcherTable.erk_table -> unit
val set_adaptivity_method :
('d, 'k) Arkode.ERKStep.session -> 'd adaptivity_method -> unit
val set_cfl_fraction : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_error_bias : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_fixed_step_bounds :
('d, 'k) Arkode.ERKStep.session -> float -> float -> unit
val set_max_efail_growth : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_max_first_growth : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_max_growth : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_min_reduction : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_safety_factor : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_small_num_efails : ('d, 'k) Arkode.ERKStep.session -> float -> unit
val set_stability_fn :
('d, 'k) Arkode.ERKStep.session -> 'd stability_fn -> unit
val clear_stability_fn : ('d, 'k) Arkode.ERKStep.session -> unit
val set_postprocess_step_fn :
('d, 'k) Arkode.ERKStep.session -> 'd postprocess_step_fn -> unit
val clear_postprocess_step_fn : ('d, 'k) Arkode.ERKStep.session -> unit
val set_constraints :
('d, 'k) Arkode.ERKStep.session -> ('d, 'k) Nvector.t -> unit
val get_work_space : ('d, 'k) Arkode.ERKStep.session -> int * int
val get_num_steps : ('d, 'k) Arkode.ERKStep.session -> int
val get_num_exp_steps : ('d, 'k) Arkode.ERKStep.session -> int
val get_num_acc_steps : ('d, 'k) Arkode.ERKStep.session -> int
val get_num_step_attempts : ('d, 'k) Arkode.ERKStep.session -> int
val get_num_rhs_evals : ('d, 'k) Arkode.ERKStep.session -> int
val get_num_err_test_fails : ('d, 'k) Arkode.ERKStep.session -> int
val get_last_step : ('d, 'k) Arkode.ERKStep.session -> float
val get_current_step : ('d, 'k) Arkode.ERKStep.session -> float
val get_actual_init_step : ('d, 'k) Arkode.ERKStep.session -> float
val get_current_time : ('d, 'k) Arkode.ERKStep.session -> float
val get_current_butcher_table :
('d, 'k) Arkode.ERKStep.session -> Arkode.ButcherTable.t
val get_tol_scale_factor : ('d, 'k) Arkode.ERKStep.session -> float
val get_err_weights :
('d, 'k) Arkode.ERKStep.session -> ('d, 'k) Nvector.t -> unit
val get_est_local_errors :
('d, 'k) Arkode.ERKStep.session -> ('d, 'k) Nvector.t -> unit
type timestepper_stats = {
exp_steps : int;
acc_steps : int;
step_attempts : int;
num_nf_evals : int;
num_err_test_fails : int;
}
val get_timestepper_stats :
('d, 'k) Arkode.ERKStep.session -> Arkode.ERKStep.timestepper_stats
val get_step_stats : ('d, 'k) Arkode.ERKStep.session -> step_stats
val print_timestepper_stats :
('d, 'k) Arkode.ERKStep.session -> Stdlib.out_channel -> unit
val print_step_stats :
('d, 'k) Arkode.ERKStep.session -> Stdlib.out_channel -> unit
val write_session :
?logfile:Sundials.Logfile.t -> ('d, 'k) Arkode.ERKStep.session -> unit
val set_root_direction :
('d, 'k) Arkode.ERKStep.session -> Sundials.RootDirs.d array -> unit
val set_all_root_directions :
('d, 'k) Arkode.ERKStep.session -> Sundials.RootDirs.d -> unit
val set_no_inactive_root_warn : ('d, 'k) Arkode.ERKStep.session -> unit
val get_num_roots : ('d, 'k) Arkode.ERKStep.session -> int
val get_root_info :
('d, 'k) Arkode.ERKStep.session -> Sundials.Roots.t -> unit
val get_num_g_evals : ('d, 'k) Arkode.ERKStep.session -> int
val get_num_constr_fails : ('d, 'k) Arkode.ERKStep.session -> int
val write_parameters :
?logfile:Sundials.Logfile.t -> ('d, 'k) Arkode.ERKStep.session -> unit
val write_butcher :
?logfile:Sundials.Logfile.t -> ('d, 'k) Arkode.ERKStep.session -> unit
end