4 #if !defined (octave_DASPK_options_h)
5 #define octave_DASPK_options_h 1
19 : x_absolute_tolerance (),
20 x_relative_tolerance (),
21 x_compute_consistent_initial_condition (),
22 x_use_initial_condition_heuristics (),
23 x_initial_condition_heuristics (),
24 x_print_initial_condition_info (),
25 x_exclude_algebraic_variables_from_error_test (),
26 x_algebraic_variables (),
27 x_enforce_inequality_constraints (),
28 x_inequality_constraint_types (),
29 x_initial_step_size (),
31 x_maximum_step_size (),
38 : x_absolute_tolerance (opt.x_absolute_tolerance),
39 x_relative_tolerance (opt.x_relative_tolerance),
40 x_compute_consistent_initial_condition (opt.x_compute_consistent_initial_condition),
41 x_use_initial_condition_heuristics (opt.x_use_initial_condition_heuristics),
42 x_initial_condition_heuristics (opt.x_initial_condition_heuristics),
43 x_print_initial_condition_info (opt.x_print_initial_condition_info),
44 x_exclude_algebraic_variables_from_error_test (opt.x_exclude_algebraic_variables_from_error_test),
45 x_algebraic_variables (opt.x_algebraic_variables),
46 x_enforce_inequality_constraints (opt.x_enforce_inequality_constraints),
47 x_inequality_constraint_types (opt.x_inequality_constraint_types),
48 x_initial_step_size (opt.x_initial_step_size),
49 x_maximum_order (opt.x_maximum_order),
50 x_maximum_step_size (opt.x_maximum_step_size),
81 x_absolute_tolerance.resize (
dim_vector (1, 1));
82 x_absolute_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
83 x_relative_tolerance.resize (
dim_vector (1, 1));
84 x_relative_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
85 x_initial_condition_heuristics.resize (
dim_vector (6, 1));
86 x_initial_condition_heuristics(0) = 5.0;
87 x_initial_condition_heuristics(1) = 6.0;
88 x_initial_condition_heuristics(2) = 5.0;
89 x_initial_condition_heuristics(3) = 0.0;
90 x_initial_condition_heuristics(4) =
::pow (std::numeric_limits<double>::epsilon (), 2.0/3.0);
91 x_initial_condition_heuristics(5) = 0.01;
92 x_algebraic_variables.resize (
dim_vector (1, 1));
93 x_algebraic_variables(0) = 0;
94 x_inequality_constraint_types.resize (
dim_vector (1, 1));
95 x_inequality_constraint_types(0) = 0;
96 x_initial_step_size = -1.0;
98 x_maximum_step_size = -1.0;
122 void set_absolute_tolerance (
double val)
124 x_absolute_tolerance.resize (
dim_vector (1, 1));
125 x_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
130 { x_absolute_tolerance = val; reset =
true; }
132 void set_relative_tolerance (
double val)
135 x_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
140 { x_relative_tolerance = val; reset =
true; }
143 { x_compute_consistent_initial_condition = val; reset =
true; }
146 { x_use_initial_condition_heuristics = val; reset =
true; }
149 { x_initial_condition_heuristics = val; reset =
true; }
152 { x_print_initial_condition_info = val; reset =
true; }
155 { x_exclude_algebraic_variables_from_error_test = val; reset =
true; }
157 void set_algebraic_variables (
int val)
159 x_algebraic_variables.resize (
dim_vector (1, 1));
160 x_algebraic_variables(0) = val;
165 { x_algebraic_variables = val; reset =
true; }
168 { x_enforce_inequality_constraints = val; reset =
true; }
172 x_inequality_constraint_types.resize (
dim_vector (1, 1));
173 x_inequality_constraint_types(0) = val;
178 { x_inequality_constraint_types = val; reset =
true; }
180 void set_initial_step_size (
double val)
181 { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
184 { x_maximum_order = val; reset =
true; }
186 void set_maximum_step_size (
double val)
187 { x_maximum_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
189 {
return x_absolute_tolerance; }
192 {
return x_relative_tolerance; }
195 {
return x_compute_consistent_initial_condition; }
198 {
return x_use_initial_condition_heuristics; }
201 {
return x_initial_condition_heuristics; }
204 {
return x_print_initial_condition_info; }
207 {
return x_exclude_algebraic_variables_from_error_test; }
210 {
return x_algebraic_variables; }
213 {
return x_enforce_inequality_constraints; }
216 {
return x_inequality_constraint_types; }
218 double initial_step_size (
void)
const
219 {
return x_initial_step_size; }
222 {
return x_maximum_order; }
224 double maximum_step_size (
void)
const
225 {
return x_maximum_step_size; }