GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DASPK-opts.h
Go to the documentation of this file.
1 // DO NOT EDIT!
2 // Generated automatically from numeric/DASPK-opts.in.
3 
4 #if !defined (octave_DASPK_options_h)
5 #define octave_DASPK_options_h 1
6 
7 #include <cfloat>
8 #include <cmath>
9 
10 #include <DAE.h>
11 
12 
13 class
15 {
16 public:
17 
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 (),
30  x_maximum_order (),
31  x_maximum_step_size (),
32  reset ()
33  {
34  init ();
35  }
36 
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),
51  reset (opt.reset)
52  { }
53 
55  {
56  if (this != &opt)
57  {
58  x_absolute_tolerance = opt.x_absolute_tolerance;
59  x_relative_tolerance = opt.x_relative_tolerance;
60  x_compute_consistent_initial_condition = opt.x_compute_consistent_initial_condition;
61  x_use_initial_condition_heuristics = opt.x_use_initial_condition_heuristics;
62  x_initial_condition_heuristics = opt.x_initial_condition_heuristics;
63  x_print_initial_condition_info = opt.x_print_initial_condition_info;
64  x_exclude_algebraic_variables_from_error_test = opt.x_exclude_algebraic_variables_from_error_test;
65  x_algebraic_variables = opt.x_algebraic_variables;
66  x_enforce_inequality_constraints = opt.x_enforce_inequality_constraints;
67  x_inequality_constraint_types = opt.x_inequality_constraint_types;
68  x_initial_step_size = opt.x_initial_step_size;
69  x_maximum_order = opt.x_maximum_order;
70  x_maximum_step_size = opt.x_maximum_step_size;
71  reset = opt.reset;
72  }
73 
74  return *this;
75  }
76 
77  ~DASPK_options (void) { }
78 
79  void init (void)
80  {
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;
97  x_maximum_order = 5;
98  x_maximum_step_size = -1.0;
99  reset = true;
100  }
101 
102  void set_options (const DASPK_options& opt)
103  {
104  x_absolute_tolerance = opt.x_absolute_tolerance;
105  x_relative_tolerance = opt.x_relative_tolerance;
106  x_compute_consistent_initial_condition = opt.x_compute_consistent_initial_condition;
107  x_use_initial_condition_heuristics = opt.x_use_initial_condition_heuristics;
108  x_initial_condition_heuristics = opt.x_initial_condition_heuristics;
109  x_print_initial_condition_info = opt.x_print_initial_condition_info;
110  x_exclude_algebraic_variables_from_error_test = opt.x_exclude_algebraic_variables_from_error_test;
111  x_algebraic_variables = opt.x_algebraic_variables;
112  x_enforce_inequality_constraints = opt.x_enforce_inequality_constraints;
113  x_inequality_constraint_types = opt.x_inequality_constraint_types;
114  x_initial_step_size = opt.x_initial_step_size;
115  x_maximum_order = opt.x_maximum_order;
116  x_maximum_step_size = opt.x_maximum_step_size;
117  reset = opt.reset;
118  }
119 
120  void set_default_options (void) { init (); }
121 
122  void set_absolute_tolerance (double val)
123  {
124  x_absolute_tolerance.resize (dim_vector (1, 1));
125  x_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
126  reset = true;
127  }
128 
130  { x_absolute_tolerance = val; reset = true; }
131 
132  void set_relative_tolerance (double val)
133  {
134  x_relative_tolerance.resize (dim_vector (1, 1));
135  x_relative_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
136  reset = true;
137  }
138 
140  { x_relative_tolerance = val; reset = true; }
141 
143  { x_compute_consistent_initial_condition = val; reset = true; }
144 
146  { x_use_initial_condition_heuristics = val; reset = true; }
147 
149  { x_initial_condition_heuristics = val; reset = true; }
150 
152  { x_print_initial_condition_info = val; reset = true; }
153 
155  { x_exclude_algebraic_variables_from_error_test = val; reset = true; }
156 
157  void set_algebraic_variables (int val)
158  {
159  x_algebraic_variables.resize (dim_vector (1, 1));
160  x_algebraic_variables(0) = val;
161  reset = true;
162  }
163 
165  { x_algebraic_variables = val; reset = true; }
166 
168  { x_enforce_inequality_constraints = val; reset = true; }
169 
171  {
172  x_inequality_constraint_types.resize (dim_vector (1, 1));
173  x_inequality_constraint_types(0) = val;
174  reset = true;
175  }
176 
178  { x_inequality_constraint_types = val; reset = true; }
179 
180  void set_initial_step_size (double val)
181  { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset = true; }
182 
184  { x_maximum_order = val; reset = true; }
185 
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; }
190 
192  { return x_relative_tolerance; }
193 
195  { return x_compute_consistent_initial_condition; }
196 
198  { return x_use_initial_condition_heuristics; }
199 
201  { return x_initial_condition_heuristics; }
202 
204  { return x_print_initial_condition_info; }
205 
207  { return x_exclude_algebraic_variables_from_error_test; }
208 
210  { return x_algebraic_variables; }
211 
213  { return x_enforce_inequality_constraints; }
214 
216  { return x_inequality_constraint_types; }
217 
218  double initial_step_size (void) const
219  { return x_initial_step_size; }
220 
222  { return x_maximum_order; }
223 
224  double maximum_step_size (void) const
225  { return x_maximum_step_size; }
226 
227 private:
228 
242 
243 protected:
244 
245  bool reset;
246 };
247 
248 #endif
Array< double > absolute_tolerance(void) const
Definition: DASPK-opts.h:188
octave_idx_type x_exclude_algebraic_variables_from_error_test
Definition: DASPK-opts.h:235
void set_inequality_constraint_types(octave_idx_type val)
Definition: DASPK-opts.h:170
Array< double > x_initial_condition_heuristics
Definition: DASPK-opts.h:233
void set_inequality_constraint_types(const Array< octave_idx_type > &val)
Definition: DASPK-opts.h:177
void set_print_initial_condition_info(octave_idx_type val)
Definition: DASPK-opts.h:151
octave_idx_type print_initial_condition_info(void) const
Definition: DASPK-opts.h:203
DASPK_options(const DASPK_options &opt)
Definition: DASPK-opts.h:37
octave_idx_type use_initial_condition_heuristics(void) const
Definition: DASPK-opts.h:197
Array< double > x_absolute_tolerance
Definition: DASPK-opts.h:229
void set_algebraic_variables(int val)
Definition: DASPK-opts.h:157
octave_idx_type x_compute_consistent_initial_condition
Definition: DASPK-opts.h:231
double maximum_step_size(void) const
Definition: DASPK-opts.h:224
void set_relative_tolerance(const Array< double > &val)
Definition: DASPK-opts.h:139
octave_idx_type x_use_initial_condition_heuristics
Definition: DASPK-opts.h:232
void set_initial_step_size(double val)
Definition: DASPK-opts.h:180
void set_maximum_step_size(double val)
Definition: DASPK-opts.h:186
ColumnVector & operator=(const ColumnVector &a)
Definition: dColVector.h:53
void set_absolute_tolerance(double val)
Definition: DASPK-opts.h:122
DASPK_options(void)
Definition: DASPK-opts.h:18
octave_idx_type x_print_initial_condition_info
Definition: DASPK-opts.h:234
double initial_step_size(void) const
Definition: DASPK-opts.h:218
void set_options(const DASPK_options &opt)
Definition: DASPK-opts.h:102
octave_idx_type maximum_order(void) const
Definition: DASPK-opts.h:221
void set_use_initial_condition_heuristics(octave_idx_type val)
Definition: DASPK-opts.h:145
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
Array< octave_idx_type > x_inequality_constraint_types
Definition: DASPK-opts.h:238
Array< octave_idx_type > algebraic_variables(void) const
Definition: DASPK-opts.h:209
octave_idx_type compute_consistent_initial_condition(void) const
Definition: DASPK-opts.h:194
octave_idx_type enforce_inequality_constraints(void) const
Definition: DASPK-opts.h:212
octave_idx_type exclude_algebraic_variables_from_error_test(void) const
Definition: DASPK-opts.h:206
Array< octave_idx_type > inequality_constraint_types(void) const
Definition: DASPK-opts.h:215
void init(void)
Definition: DASPK-opts.h:79
Array< double > x_relative_tolerance
Definition: DASPK-opts.h:230
void set_maximum_order(octave_idx_type val)
Definition: DASPK-opts.h:183
Array< octave_idx_type > x_algebraic_variables
Definition: DASPK-opts.h:236
void set_enforce_inequality_constraints(octave_idx_type val)
Definition: DASPK-opts.h:167
Array< double > relative_tolerance(void) const
Definition: DASPK-opts.h:191
octave_idx_type x_maximum_order
Definition: DASPK-opts.h:240
double x_maximum_step_size
Definition: DASPK-opts.h:241
octave_idx_type x_enforce_inequality_constraints
Definition: DASPK-opts.h:237
void set_relative_tolerance(double val)
Definition: DASPK-opts.h:132
void set_algebraic_variables(const Array< octave_idx_type > &val)
Definition: DASPK-opts.h:164
~DASPK_options(void)
Definition: DASPK-opts.h:77
double x_initial_step_size
Definition: DASPK-opts.h:239
void set_absolute_tolerance(const Array< double > &val)
Definition: DASPK-opts.h:129
void set_default_options(void)
Definition: DASPK-opts.h:120
void set_exclude_algebraic_variables_from_error_test(octave_idx_type val)
Definition: DASPK-opts.h:154
void set_initial_condition_heuristics(const Array< double > &val)
Definition: DASPK-opts.h:148
void set_compute_consistent_initial_condition(octave_idx_type val)
Definition: DASPK-opts.h:142
Array< double > initial_condition_heuristics(void) const
Definition: DASPK-opts.h:200