4 #if ! defined (octave_DASPK_options_h)
5 #define octave_DASPK_options_h 1
20 : m_absolute_tolerance (),
21 m_relative_tolerance (),
22 m_compute_consistent_initial_condition (),
23 m_use_initial_condition_heuristics (),
24 m_initial_condition_heuristics (),
25 m_print_initial_condition_info (),
26 m_exclude_algebraic_variables_from_error_test (),
27 m_algebraic_variables (),
28 m_enforce_inequality_constraints (),
29 m_inequality_constraint_types (),
30 m_initial_step_size (),
32 m_maximum_step_size (),
39 : m_absolute_tolerance (opt.m_absolute_tolerance),
40 m_relative_tolerance (opt.m_relative_tolerance),
41 m_compute_consistent_initial_condition (opt.m_compute_consistent_initial_condition),
42 m_use_initial_condition_heuristics (opt.m_use_initial_condition_heuristics),
43 m_initial_condition_heuristics (opt.m_initial_condition_heuristics),
44 m_print_initial_condition_info (opt.m_print_initial_condition_info),
45 m_exclude_algebraic_variables_from_error_test (opt.m_exclude_algebraic_variables_from_error_test),
46 m_algebraic_variables (opt.m_algebraic_variables),
47 m_enforce_inequality_constraints (opt.m_enforce_inequality_constraints),
48 m_inequality_constraint_types (opt.m_inequality_constraint_types),
49 m_initial_step_size (opt.m_initial_step_size),
50 m_maximum_order (opt.m_maximum_order),
51 m_maximum_step_size (opt.m_maximum_step_size),
59 m_absolute_tolerance = opt.m_absolute_tolerance;
60 m_relative_tolerance = opt.m_relative_tolerance;
61 m_compute_consistent_initial_condition = opt.m_compute_consistent_initial_condition;
62 m_use_initial_condition_heuristics = opt.m_use_initial_condition_heuristics;
63 m_initial_condition_heuristics = opt.m_initial_condition_heuristics;
64 m_print_initial_condition_info = opt.m_print_initial_condition_info;
65 m_exclude_algebraic_variables_from_error_test = opt.m_exclude_algebraic_variables_from_error_test;
66 m_algebraic_variables = opt.m_algebraic_variables;
67 m_enforce_inequality_constraints = opt.m_enforce_inequality_constraints;
68 m_inequality_constraint_types = opt.m_inequality_constraint_types;
69 m_initial_step_size = opt.m_initial_step_size;
70 m_maximum_order = opt.m_maximum_order;
71 m_maximum_step_size = opt.m_maximum_step_size;
82 m_absolute_tolerance.resize (
dim_vector (1, 1));
83 m_absolute_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
84 m_relative_tolerance.resize (
dim_vector (1, 1));
85 m_relative_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
86 m_compute_consistent_initial_condition = 0;
87 m_use_initial_condition_heuristics = 0;
88 m_initial_condition_heuristics.resize (
dim_vector (6, 1));
89 m_initial_condition_heuristics(0) = 5.0;
90 m_initial_condition_heuristics(1) = 6.0;
91 m_initial_condition_heuristics(2) = 5.0;
92 m_initial_condition_heuristics(3) = 0.0;
93 m_initial_condition_heuristics(4) =
::pow (std::numeric_limits<double>::epsilon (), 2.0/3.0);
94 m_initial_condition_heuristics(5) = 0.01;
95 m_print_initial_condition_info = 0;
96 m_exclude_algebraic_variables_from_error_test = 0;
97 m_algebraic_variables.resize (
dim_vector (1, 1));
98 m_algebraic_variables(0) = 0;
99 m_enforce_inequality_constraints = 0;
100 m_inequality_constraint_types.resize (
dim_vector (1, 1));
101 m_inequality_constraint_types(0) = 0;
102 m_initial_step_size = -1.0;
104 m_maximum_step_size = -1.0;
110 m_absolute_tolerance = opt.m_absolute_tolerance;
111 m_relative_tolerance = opt.m_relative_tolerance;
112 m_compute_consistent_initial_condition = opt.m_compute_consistent_initial_condition;
113 m_use_initial_condition_heuristics = opt.m_use_initial_condition_heuristics;
114 m_initial_condition_heuristics = opt.m_initial_condition_heuristics;
115 m_print_initial_condition_info = opt.m_print_initial_condition_info;
116 m_exclude_algebraic_variables_from_error_test = opt.m_exclude_algebraic_variables_from_error_test;
117 m_algebraic_variables = opt.m_algebraic_variables;
118 m_enforce_inequality_constraints = opt.m_enforce_inequality_constraints;
119 m_inequality_constraint_types = opt.m_inequality_constraint_types;
120 m_initial_step_size = opt.m_initial_step_size;
121 m_maximum_order = opt.m_maximum_order;
122 m_maximum_step_size = opt.m_maximum_step_size;
130 m_absolute_tolerance.resize (
dim_vector (1, 1));
131 m_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
136 { m_absolute_tolerance = val; m_reset =
true; }
140 m_relative_tolerance.resize (
dim_vector (1, 1));
141 m_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
146 { m_relative_tolerance = val; m_reset =
true; }
149 { m_compute_consistent_initial_condition = val; m_reset =
true; }
152 { m_use_initial_condition_heuristics = val; m_reset =
true; }
155 { m_initial_condition_heuristics = val; m_reset =
true; }
158 { m_print_initial_condition_info = val; m_reset =
true; }
161 { m_exclude_algebraic_variables_from_error_test = val; m_reset =
true; }
165 m_algebraic_variables.resize (
dim_vector (1, 1));
166 m_algebraic_variables(0) = val;
171 { m_algebraic_variables = val; m_reset =
true; }
174 { m_enforce_inequality_constraints = val; m_reset =
true; }
178 m_inequality_constraint_types.resize (
dim_vector (1, 1));
179 m_inequality_constraint_types(0) = val;
184 { m_inequality_constraint_types = val; m_reset =
true; }
187 { m_initial_step_size = (val >= 0.0) ? val : -1.0; m_reset =
true; }
190 { m_maximum_order = val; m_reset =
true; }
193 { m_maximum_step_size = (val >= 0.0) ? val : -1.0; m_reset =
true; }
195 {
return m_absolute_tolerance; }
198 {
return m_relative_tolerance; }
201 {
return m_compute_consistent_initial_condition; }
204 {
return m_use_initial_condition_heuristics; }
207 {
return m_initial_condition_heuristics; }
210 {
return m_print_initial_condition_info; }
213 {
return m_exclude_algebraic_variables_from_error_test; }
216 {
return m_algebraic_variables; }
219 {
return m_enforce_inequality_constraints; }
222 {
return m_inequality_constraint_types; }
225 {
return m_initial_step_size; }
228 {
return m_maximum_order; }
231 {
return m_maximum_step_size; }
245 double m_initial_step_size;
247 double m_maximum_step_size;
void set_use_initial_condition_heuristics(octave_idx_type val)
octave_idx_type enforce_inequality_constraints() const
double initial_step_size() const
void set_maximum_step_size(double val)
octave_idx_type maximum_order() const
Array< double > absolute_tolerance() const
void set_enforce_inequality_constraints(octave_idx_type val)
DASPK_options(const DASPK_options &opt)
Array< octave_idx_type > inequality_constraint_types() const
void set_relative_tolerance(const Array< double > &val)
void set_maximum_order(octave_idx_type val)
octave_idx_type use_initial_condition_heuristics() const
void set_compute_consistent_initial_condition(octave_idx_type val)
void set_exclude_algebraic_variables_from_error_test(octave_idx_type val)
void set_default_options()
void set_absolute_tolerance(double val)
octave_idx_type compute_consistent_initial_condition() const
void set_algebraic_variables(const Array< octave_idx_type > &val)
double maximum_step_size() const
void set_print_initial_condition_info(octave_idx_type val)
void set_inequality_constraint_types(octave_idx_type val)
void set_inequality_constraint_types(const Array< octave_idx_type > &val)
void set_relative_tolerance(double val)
void set_initial_step_size(double val)
void set_algebraic_variables(int val)
Array< octave_idx_type > algebraic_variables() const
void set_initial_condition_heuristics(const Array< double > &val)
Array< double > relative_tolerance() const
void set_options(const DASPK_options &opt)
Array< double > initial_condition_heuristics() const
octave_idx_type exclude_algebraic_variables_from_error_test() const
octave_idx_type print_initial_condition_info() const
void set_absolute_tolerance(const Array< double > &val)
Vector representing the dimensions (size) of an Array.
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)