4 #if !defined (octave_LSODE_options_h)
5 #define octave_LSODE_options_h 1
19 : x_absolute_tolerance (),
20 x_relative_tolerance (),
21 x_integration_method (),
22 x_initial_step_size (),
24 x_maximum_step_size (),
25 x_minimum_step_size (),
33 : x_absolute_tolerance (opt.x_absolute_tolerance),
34 x_relative_tolerance (opt.x_relative_tolerance),
35 x_integration_method (opt.x_integration_method),
36 x_initial_step_size (opt.x_initial_step_size),
37 x_maximum_order (opt.x_maximum_order),
38 x_maximum_step_size (opt.x_maximum_step_size),
39 x_minimum_step_size (opt.x_minimum_step_size),
40 x_step_limit (opt.x_step_limit),
66 x_absolute_tolerance.resize (
dim_vector (1, 1));
67 x_absolute_tolerance(0) = ::sqrt (std::numeric_limits<double>::epsilon ());
68 x_relative_tolerance = ::sqrt (std::numeric_limits<double>::epsilon ());
69 x_integration_method =
"stiff";
70 x_initial_step_size = -1.0;
72 x_maximum_step_size = -1.0;
73 x_minimum_step_size = 0.0;
74 x_step_limit = 100000;
95 x_absolute_tolerance.resize (
dim_vector (1, 1));
96 x_absolute_tolerance(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ());
101 { x_absolute_tolerance = val; reset =
true; }
104 { x_relative_tolerance = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ()); reset =
true; }
108 if (val ==
"stiff" || val ==
"bdf")
109 x_integration_method =
"stiff";
110 else if (val ==
"non-stiff" || val ==
"adams")
111 x_integration_method =
"non-stiff";
114 (
"lsode_options: method must be \"stiff\", \"bdf\", \"non-stiff\", or \"adams\"");
119 { x_initial_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
122 { x_maximum_order = val; reset =
true; }
125 { x_maximum_step_size = (val >= 0.0) ? val : -1.0; reset =
true; }
128 { x_minimum_step_size = (val >= 0.0) ? val : 0.0; reset =
true; }
131 { x_step_limit = val; reset =
true; }
133 {
return x_absolute_tolerance; }
136 {
return x_relative_tolerance; }
139 {
return x_integration_method; }
142 {
return x_initial_step_size; }
145 {
return x_maximum_order; }
148 {
return x_maximum_step_size; }
151 {
return x_minimum_step_size; }
154 {
return x_step_limit; }
double relative_tolerance(void) const
void set_initial_step_size(double val)
double maximum_step_size(void) const
Array< double > absolute_tolerance(void) const
double initial_step_size(void) const
void set_absolute_tolerance(double val)
std::string integration_method(void) const
void set_default_options(void)
Array< double > x_absolute_tolerance
void set_maximum_step_size(double val)
void set_options(const LSODE_options &opt)
void set_relative_tolerance(double val)
liboctave_error_handler current_liboctave_error_handler
double x_relative_tolerance
void set_minimum_step_size(double val)
octave_idx_type step_limit(void) const
std::string x_integration_method
void set_step_limit(octave_idx_type val)
LSODE_options(const LSODE_options &opt)
double x_initial_step_size
double x_minimum_step_size
octave_idx_type maximum_order(void) const
octave_idx_type x_maximum_order
double x_maximum_step_size
void set_maximum_order(octave_idx_type val)
octave_idx_type x_step_limit
double minimum_step_size(void) const
void set_integration_method(const std::string &val)
void set_absolute_tolerance(const Array< double > &val)