32 #define NUM_OPTIONS 13
36 {
"absolute tolerance",
37 {
"absolute",
"tolerance", 0, 0, 0, 0, 0, },
38 { 2, 0, 0, 0, 0, 0, 0, }, 1, },
40 {
"relative tolerance",
41 {
"relative",
"tolerance", 0, 0, 0, 0, 0, },
42 { 1, 0, 0, 0, 0, 0, 0, }, 1, },
44 {
"compute consistent initial condition",
45 {
"compute",
"consistent",
"initial",
"condition", 0, 0, 0, },
46 { 1, 0, 0, 0, 0, 0, 0, }, 1, },
48 {
"use initial condition heuristics",
49 {
"use",
"initial",
"condition",
"heuristics", 0, 0, 0, },
50 { 1, 0, 0, 0, 0, 0, 0, }, 1, },
52 {
"initial condition heuristics",
53 {
"initial",
"condition",
"heuristics", 0, 0, 0, 0, },
54 { 3, 1, 0, 0, 0, 0, 0, }, 2, },
56 {
"print initial condition info",
57 {
"print",
"initial",
"condition",
"info", 0, 0, 0, },
58 { 1, 0, 0, 0, 0, 0, 0, }, 1, },
60 {
"exclude algebraic variables from error test",
61 {
"exclude",
"algebraic",
"variables",
"from",
"error",
"test", 0, },
62 { 2, 0, 0, 0, 0, 0, 0, }, 1, },
64 {
"algebraic variables",
65 {
"algebraic",
"variables", 0, 0, 0, 0, 0, },
66 { 2, 0, 0, 0, 0, 0, 0, }, 1, },
68 {
"enforce inequality constraints",
69 {
"enforce",
"inequality",
"constraints", 0, 0, 0, 0, },
70 { 2, 0, 0, 0, 0, 0, 0, }, 1, },
72 {
"inequality constraint types",
73 {
"inequality",
"constraint",
"types", 0, 0, 0, 0, },
74 { 3, 0, 0, 0, 0, 0, 0, }, 1, },
76 {
"initial step size",
77 {
"initial",
"step",
"size", 0, 0, 0, 0, },
78 { 3, 1, 0, 0, 0, 0, 0, }, 2, },
81 {
"maximum",
"order", 0, 0, 0, 0, 0, },
82 { 1, 1, 0, 0, 0, 0, 0, }, 2, },
84 {
"maximum step size",
85 {
"maximum",
"step",
"size", 0, 0, 0, 0, },
86 { 1, 1, 0, 0, 0, 0, 0, }, 2, },
92 std::ostringstream buf;
95 <<
"Options for DASPK include:\n\n"
97 <<
" ------- -----\n";
110 if (val.
numel () == 1)
112 os <<
val(0) <<
"\n";
132 if (val.
numel () == 1)
134 os <<
val(0) <<
"\n";
178 if (val.
numel () == 1)
180 os <<
val(0) <<
"\n";
224 if (val.
numel () == 1)
226 os <<
val(0) <<
"\n";
261 if (val.
numel () == 1)
263 os <<
val(0) <<
"\n";
322 keyword, list[0].min_toks_to_match,
MAX_TOKENS))
329 keyword, list[1].min_toks_to_match,
MAX_TOKENS))
336 keyword, list[2].min_toks_to_match,
MAX_TOKENS))
343 keyword, list[3].min_toks_to_match,
MAX_TOKENS))
350 keyword, list[4].min_toks_to_match,
MAX_TOKENS))
357 keyword, list[5].min_toks_to_match,
MAX_TOKENS))
364 keyword, list[6].min_toks_to_match,
MAX_TOKENS))
371 keyword, list[7].min_toks_to_match,
MAX_TOKENS))
378 keyword, list[8].min_toks_to_match,
MAX_TOKENS))
385 keyword, list[9].min_toks_to_match,
MAX_TOKENS))
392 keyword, list[10].min_toks_to_match,
MAX_TOKENS))
399 keyword, list[11].min_toks_to_match,
MAX_TOKENS))
406 keyword, list[12].min_toks_to_match,
MAX_TOKENS))
414 warning (
"daspk_options: no match for `%s'", keyword.c_str ());
426 keyword, list[0].min_toks_to_match,
MAX_TOKENS))
430 if (val.
numel () == 1)
440 keyword, list[1].min_toks_to_match,
MAX_TOKENS))
444 if (val.
numel () == 1)
454 keyword, list[2].min_toks_to_match,
MAX_TOKENS))
458 retval =
static_cast<double> (
val);
461 keyword, list[3].min_toks_to_match,
MAX_TOKENS))
465 retval =
static_cast<double> (
val);
468 keyword, list[4].min_toks_to_match,
MAX_TOKENS))
472 if (val.
numel () == 1)
482 keyword, list[5].min_toks_to_match,
MAX_TOKENS))
486 retval =
static_cast<double> (
val);
489 keyword, list[6].min_toks_to_match,
MAX_TOKENS))
493 retval =
static_cast<double> (
val);
496 keyword, list[7].min_toks_to_match,
MAX_TOKENS))
500 if (val.
numel () == 1)
502 retval =
static_cast<double> (
val(0));
514 keyword, list[8].min_toks_to_match,
MAX_TOKENS))
518 retval =
static_cast<double> (
val);
521 keyword, list[9].min_toks_to_match,
MAX_TOKENS))
525 if (val.
numel () == 1)
527 retval =
static_cast<double> (
val(0));
539 keyword, list[10].min_toks_to_match,
MAX_TOKENS))
546 keyword, list[11].min_toks_to_match,
MAX_TOKENS))
550 retval =
static_cast<double> (
val);
553 keyword, list[12].min_toks_to_match,
MAX_TOKENS))
561 warning (
"daspk_options: no match for `%s'", keyword.c_str ());
754 std::string keyword =
args(0).xstring_value (
"daspk_options: expecting keyword as first argument");
Array< double > absolute_tolerance(void) const
The value of lines which begin with a space character are not saved in the history list A value of all commands are saved on the history list
OCTINTERP_API void print_usage(void)
octave_idx_type numel(void) const
Number of elements in the array.
void set_inequality_constraint_types(octave_idx_type val)
identity matrix If supplied two scalar respectively For allows like xample val
int int_value(bool req_int=false, bool frc_str_conv=false) const
#define DEFUN(name, args_name, nargout_name, doc)
void set_print_initial_condition_info(octave_idx_type val)
octave_idx_type print_initial_condition_info(void) const
octave_idx_type use_initial_condition_heuristics(void) const
void set_algebraic_variables(int val)
static void set_DASPK_options(const std::string &keyword, const octave_value &val)
double maximum_step_size(void) const
void set_initial_step_size(double val)
void set_maximum_step_size(double val)
void set_absolute_tolerance(double val)
double initial_step_size(void) const
octave_idx_type maximum_order(void) const
void set_use_initial_condition_heuristics(octave_idx_type val)
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
int keyword_almost_match(const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)
octave_idx_type exclude_algebraic_variables_from_error_test(void) const
Array< octave_idx_type > inequality_constraint_types(void) const
static DASPK_options_struct DASPK_options_table[]
static octave_value_list show_DASPK_options(const std::string &keyword)
void warning(const char *fmt,...)
void set_maximum_order(octave_idx_type val)
=val(i)}if ode{val(i)}occurs in table i
void set_enforce_inequality_constraints(octave_idx_type val)
Array< double > relative_tolerance(void) const
void octave_print_internal(std::ostream &, char, bool)
static void print_DASPK_options(std::ostream &os)
Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
void set_relative_tolerance(double val)
Array< int > int_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) const
double double_value(bool frc_str_conv=false) const
static DASPK_options daspk_opts
void set_exclude_algebraic_variables_from_error_test(octave_idx_type val)
void set_initial_condition_heuristics(const Array< double > &val)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
void set_compute_consistent_initial_condition(octave_idx_type val)
Array< double > initial_condition_heuristics(void) const