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;
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; }
134 x_relative_tolerance.resize (
dim_vector (1, 1));
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; }
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; }
181 { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
184 { x_maximum_order = val; reset =
true; }
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; }
219 {
return x_initial_step_size; }
222 {
return x_maximum_order; }
225 {
return x_maximum_step_size; }
Array< double > absolute_tolerance(void) const
octave_idx_type x_exclude_algebraic_variables_from_error_test
void set_inequality_constraint_types(octave_idx_type val)
Array< double > x_initial_condition_heuristics
void set_inequality_constraint_types(const Array< octave_idx_type > &val)
void set_print_initial_condition_info(octave_idx_type val)
octave_idx_type print_initial_condition_info(void) const
DASPK_options(const DASPK_options &opt)
octave_idx_type use_initial_condition_heuristics(void) const
Array< double > x_absolute_tolerance
void set_algebraic_variables(int val)
octave_idx_type x_compute_consistent_initial_condition
double maximum_step_size(void) const
void set_relative_tolerance(const Array< double > &val)
octave_idx_type x_use_initial_condition_heuristics
void set_initial_step_size(double val)
void set_maximum_step_size(double val)
ColumnVector & operator=(const ColumnVector &a)
void set_absolute_tolerance(double val)
octave_idx_type x_print_initial_condition_info
double initial_step_size(void) const
void set_options(const DASPK_options &opt)
octave_idx_type maximum_order(void) const
void set_use_initial_condition_heuristics(octave_idx_type val)
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
Array< octave_idx_type > x_inequality_constraint_types
Array< octave_idx_type > algebraic_variables(void) const
octave_idx_type compute_consistent_initial_condition(void) const
octave_idx_type enforce_inequality_constraints(void) const
octave_idx_type exclude_algebraic_variables_from_error_test(void) const
Array< octave_idx_type > inequality_constraint_types(void) const
Array< double > x_relative_tolerance
void set_maximum_order(octave_idx_type val)
Array< octave_idx_type > x_algebraic_variables
void set_enforce_inequality_constraints(octave_idx_type val)
Array< double > relative_tolerance(void) const
octave_idx_type x_maximum_order
double x_maximum_step_size
octave_idx_type x_enforce_inequality_constraints
void set_relative_tolerance(double val)
void set_algebraic_variables(const Array< octave_idx_type > &val)
double x_initial_step_size
void set_absolute_tolerance(const Array< double > &val)
void set_default_options(void)
void set_exclude_algebraic_variables_from_error_test(octave_idx_type val)
void set_initial_condition_heuristics(const Array< double > &val)
void set_compute_consistent_initial_condition(octave_idx_type val)
Array< double > initial_condition_heuristics(void) const