annotate src/of-odepkg-3-deprecated.patch @ 5893:53a6c7df43f8

Mesa 3D: Update to version 21.1.8. * src/mesa.mk: Update version and checksum. * src/mesa-2-uninitialized.patch: Remove file. * dist-files.mk: Remove file from list.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 16 Sep 2021 22:37:45 +0200
parents 79edc3a96749
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4931
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1 diff -r 1646adc7793b src/odepkg_auxiliary_functions.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2 --- a/src/odepkg_auxiliary_functions.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
3 +++ b/src/odepkg_auxiliary_functions.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
4 @@ -46,7 +46,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
5 * @end deftypefn
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
6 */
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
7 octave_idx_type odepkg_auxiliary_isvector (octave_value vval) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
8 - if (vval.is_numeric_type () &&
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
9 + if (vval.isnumeric () &&
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
10 vval.ndims () == 2 && // ported from the is_vector.m file
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
11 (vval.rows () == 1 || vval.columns () == 1))
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
12 return (true);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
13 @@ -85,17 +85,17 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
14 switch (vdeci) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
15 case 0:
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
16 varin(3) = "init";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
17 - feval ("odepkg_event_handle", varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
18 + octave::feval ("odepkg_event_handle", varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
19 break;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
20
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
21 case 1:
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
22 varin(3) = "";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
23 - varout = feval ("odepkg_event_handle", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
24 + varout = octave::feval ("odepkg_event_handle", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
25 break;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
26
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
27 case 2:
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
28 varin(3) = "done";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
29 - feval ("odepkg_event_handle", varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
30 + octave::feval ("odepkg_event_handle", varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
31 break;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
32
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
33 default:
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
34 @@ -132,8 +132,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
35
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
36 // Check if the user has set the option "OutputSel" then create a
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
37 // reduced vector that stores the desired values.
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
38 - if (vsel.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
39 - for (octave_idx_type vcnt = 0; vcnt < vresult.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
40 + if (vsel.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
41 + for (octave_idx_type vcnt = 0; vcnt < vresult.numel (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
42 vreduced(vcnt) = vresult(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
43 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
44 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
45 @@ -159,18 +159,18 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
46 // function to the caller function
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
47 if ((vdeci == 0) || (vdeci == 2)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
48 if (vplt.is_function_handle () || vplt.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
49 - feval (vplt.function_value (), varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
50 + octave::feval (vplt.function_value (), varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
51 else if (vplt.is_string ()) // String may be used from the caller
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
52 - feval (vplt.string_value (), varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
53 + octave::feval (vplt.string_value (), varin, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
54 return (true);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
55 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
56
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
57 else if (vdeci == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
58 octave_value_list vout;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
59 if (vplt.is_function_handle () || vplt.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
60 - vout = feval (vplt.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
61 + vout = octave::feval (vplt.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
62 else if (vplt.is_string ()) // String may be used if set automatically
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
63 - vout = feval (vplt.string_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
64 + vout = octave::feval (vplt.string_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
65 return (vout(0).bool_value ());
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
66 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
67
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
68 @@ -200,7 +200,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
69
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
70 // If vjac is a cell array then we expect that two matrices are
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
71 // returned to the caller function, we can't check for this before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
72 - if (vjac.is_cell () && (vjac.length () == 2)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
73 + if (vjac.iscell () && (vjac.numel () == 2)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
74 varout(0) = vjac.cell_value ()(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
75 varout(1) = vjac.cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
76 if (!varout(0).is_matrix_type () || !varout(1).is_matrix_type ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
77 @@ -220,7 +220,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
78 for (octave_idx_type vcnt = 0; vcnt < vextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
79 varin(vcnt+3) = vextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
80 // Evaluate the Jacobian function and return results
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
81 - varout = feval (vjac.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
82 + varout = octave::feval (vjac.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
83 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
84
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
85 // In principle this is not possible because odepkg_structure_check
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
86 @@ -268,7 +268,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
87 for (octave_idx_type vcnt = 0; vcnt < vextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
88 varin(vcnt+2) = vextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
89 // Evaluate the Jacobian function and return results
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
90 - varout = feval (vjac.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
91 + varout = octave::feval (vjac.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
92 vret = varout(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
93 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
94
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
95 @@ -312,7 +312,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
96 else if (vmass.is_function_handle () || vmass.is_inline_function ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
97 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
98 octave_value_list varout;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
99 - if (vstate.is_empty () || !vstate.is_string ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
100 + if (vstate.isempty () || !vstate.is_string ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
101 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
102 "If \"Mass\" value is a handle then \"MStateDependence\" must be given");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
103
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
104 @@ -330,7 +330,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
105 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
106
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
107 // Evaluate the Mass function and return results
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
108 - varout = feval (vmass.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
109 + varout = octave::feval (vmass.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
110 vret = varout(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
111 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
112
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
113 @@ -440,7 +440,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
114 break;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
115
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
116 case 3:
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
117 - vtstore = vtstore.extract (0, vtstore.length () - 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
118 + vtstore = vtstore.extract (0, vtstore.numel () - 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
119 vystore = vystore.extract (0, 0, vtstore.rows () - 2, vtstore.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
120
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
121 default:
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
122 diff -r 1646adc7793b src/odepkg_octsolver_ddaskr.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
123 --- a/src/odepkg_octsolver_ddaskr.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
124 +++ b/src/odepkg_octsolver_ddaskr.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
125 @@ -116,7 +116,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
126 varin(0) = T; varin(1) = A; varin(2) = APRIME;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
127 for (octave_idx_type vcnt = 0; vcnt < vddaskrextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
128 varin(vcnt+3) = vddaskrextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
129 - octave_value_list vout = feval (vddaskrodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
130 + octave_value_list vout = octave::feval (vddaskrodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
131
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
132 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
133 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
134 @@ -287,8 +287,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
135 if (nargin >= 5) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
136
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
137 // Fifth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
138 - if (!args(4).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
139 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
140 + if (!args(4).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
141 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
142 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
143 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
144 vddaskrextarg(vcnt-4) = args(vcnt); // Save arguments in vddaskrextarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
145 @@ -298,7 +298,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
146 else if (nargin > 5) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
147 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
148 varin(0) = args(4); varin(1) = "odekdi";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
149 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
150 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
151 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
152 vodeopt = tmp(0).scalar_map_value (); // Create structure of args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
153 for (octave_idx_type vcnt = 5; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
154 @@ -309,7 +309,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
155 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
156 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
157 varin(0) = args(4); varin(1) = "odekdi"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
158 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
159 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
160 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
161 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
162 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
163 @@ -317,7 +317,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
164 } // if (nargin >= 5)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
165
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
166 else { // if nargin == 4, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
167 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
168 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
169 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
170 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
171
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
172 @@ -329,7 +329,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
173 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
174 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
175 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
176 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
177 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
178 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
179 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
180 "Option \"RelTol\" not set, new value 1e-6 is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
181 @@ -345,7 +345,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
182 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
183 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
184 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
185 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
186 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
187 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
188 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
189 "Option \"AbsTol\" not set, new value 1e-6 is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
190 @@ -372,7 +372,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
191 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
192 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
193 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
194 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
195 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
196 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
197 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
198 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
199 @@ -380,14 +380,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
200 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
201 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
202 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
203 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
204 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
205 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
206 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
207
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
208 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
209 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
210 octave_value vplot = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
211 - if (vplot.is_empty () && nargout == 0) vplot = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
212 + if (vplot.isempty () && nargout == 0) vplot = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
213
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
214 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
215 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
216 @@ -408,12 +408,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
217 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
218 octave_value vinitstep = vodeopt.contents ("InitialStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
219 if (args(1).length () > 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
220 - if (!vinitstep.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
221 + if (!vinitstep.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
222 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
223 "Option \"InitialStep\" will be ignored if fixed time stamps are given");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
224 vinitstep = args(1).vector_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
225 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
226 - else if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
227 + else if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
228 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
229 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
230 "Option \"InitialStep\" not set, new value 1e-6 is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
231 @@ -422,7 +422,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
232 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
233 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
234 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
235 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
236 + if (vmaxstep.isempty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
237 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
238 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
239 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
240 @@ -437,19 +437,19 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
241
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
242 // The options 'Jacobian', 'JPattern' and 'Vectorized'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
243 octave_value vjac = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
244 - if (!vjac.is_empty ()) vddaskrjacfun = vjac;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
245 + if (!vjac.isempty ()) vddaskrjacfun = vjac;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
246
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
247 // The option Mass will be ignored by this solver. We can't handle
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
248 // Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
249 octave_value vmass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
250 - if (!vmass.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
251 + if (!vmass.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
252 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
253 "Option \"Mass\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
254
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
255 // The option MStateDependence will be ignored by this solver. We
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
256 // can't handle Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
257 octave_value vmst = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
258 - if (!vmst.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
259 + if (!vmst.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
260 if (vmst.string_value ().compare ("weak") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
261 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
262 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
263 @@ -457,14 +457,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
264 // The option MvPattern will be ignored by this solver. We
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
265 // can't handle Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
266 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
267 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
268 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
269 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
270 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
271
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
272 // The option MvPattern will be ignored by this solver. We
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
273 // can't handle Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
274 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
275 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
276 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
277 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
278 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
279 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
280 @@ -472,14 +472,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
281 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
282 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
283 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
284 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
285 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
286 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
287 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
288
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
289 // Implementation of the option MaxOrder has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
290 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
291 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
292 - if (vmaxder.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
293 + if (vmaxder.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
294 vmaxder = 3;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
295 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
296 "Option \"MaxOrder\" not set, new value 3 is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
297 @@ -492,7 +492,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
298
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
299 // The option BDF will be ignored because this is a BDF solver
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
300 octave_value vbdf = vodeopt.contents ("BDF");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
301 - if (!vbdf.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
302 + if (!vbdf.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
303 if (vbdf.string_value () != "on") {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
304 vbdf = "on"; warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
305 "Option \"BDF\" set \"off\", new value \"on\" is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
306 @@ -502,12 +502,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
307 // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
308 // CAN HANDLE THESE OPTIONS
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
309 octave_value vntol = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
310 - if (!vntol.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
311 + if (!vntol.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
312 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
313 "Option \"NewtonTol\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
314 octave_value vmaxnewton =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
315 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
316 - if (!vmaxnewton.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
317 + if (!vmaxnewton.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
318 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
319 "Option \"MaxNewtonIterations\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
320
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
321 @@ -523,7 +523,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
322
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
323 vddaskrneqn = args(2).length ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
324 double T = vTIME(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
325 - double TEND = vTIME(vTIME.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
326 + double TEND = vTIME(vTIME.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
327 double *Y = vY.fortran_vec ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
328 double *YPRIME = vYPRIME.fortran_vec ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
329
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
330 @@ -553,7 +553,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
331 INFO[1] = vitol; // RelTol/AbsTol are scalars or vectors
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
332 INFO[2] = 1; // An intermediate output is wanted
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
333 INFO[3] = 0; // Integrate behind TEND
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
334 - if (!vjac.is_empty ()) INFO[4] = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
335 + if (!vjac.isempty ()) INFO[4] = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
336 else INFO[4] = 0; // Internally calculate a Jacobian? 0..yes
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
337 INFO[5] = 0; // Have a full Jacobian matrix? 0..yes
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
338 INFO[6] = 1; // Use the value for maximum step size
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
339 @@ -569,14 +569,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
340 // initialize these IO-functions for further use
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
341 octave_value vtim (T); octave_value vsol (vY); octave_value vyds (vYPRIME);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
342 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
343 - if (!vplot.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
344 + if (!vplot.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
345 odepkg_auxiliary_evalplotfun (vplot, voutsel, args(1), args(2), vddaskrextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
346
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
347 octave_value_list veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
348 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
349 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
350 Cell veveidearg (veveideargs);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
351 - if (!vevents.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
352 + if (!vevents.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
353 odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vddaskrextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
354
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
355 // We are calling the core solver here to intialize all variables
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
356 @@ -597,7 +597,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
357 ColumnVector vcres(vddaskrneqn);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
358 ColumnVector vydrs(vddaskrneqn);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
359
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
360 - if (vTIME.length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
361 + if (vTIME.numel () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
362
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
363 INFO[0] = 1; // Set this info variable ie. continue solving
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
364
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
365 @@ -621,22 +621,22 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
366 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
367 vsol = vcres; vyds = vydrs; vtim = T;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
368
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
369 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
370 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
371 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
372 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
373 veveidearg = veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
374 veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vddaskrextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
375 - if (!veveres(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
376 + if (!veveres(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
377 if (veveres(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
378 ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
379 Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
380 - vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
381 + vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
382 vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
383 T = TEND; // let's get out here, the Events function told us to finish
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
384 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
385 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
386
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
387 - if (!vplot.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
388 + if (!vplot.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
389 if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vddaskrextarg, 1)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
390 error ("Missing error message implementation");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
391 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
392 @@ -660,9 +660,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
393 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
394 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
395 veveidearg = veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
396 - if (!vevents.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
397 + if (!vevents.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
398 odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vddaskrextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
399 - if (!vplot.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
400 + if (!vplot.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
401 odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vddaskrextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
402
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
403 // Return the results that have been stored in the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
404 @@ -695,7 +695,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
405 vretmap.assign ("solver", "odekdi");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
406 if (vstats.string_value ().compare ("on") == 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
407 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
408 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
409 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
410 vretmap.assign ("ie", veveres(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
411 vretmap.assign ("xe", veveres(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
412 vretmap.assign ("ye", veveres(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
413 @@ -713,7 +713,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
414 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
415 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
416 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
417 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
418 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
419 vretval(2) = veveres(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
420 vretval(3) = veveres(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
421 vretval(4) = veveres(0).cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
422 diff -r 1646adc7793b src/odepkg_octsolver_mebdfdae.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
423 --- a/src/odepkg_octsolver_mebdfdae.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
424 +++ b/src/odepkg_octsolver_mebdfdae.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
425 @@ -100,7 +100,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
426 varin(0) = T; varin(1) = A;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
427 for (octave_idx_type vcnt = 0; vcnt < vmebdfdaeextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
428 varin(vcnt+2) = vmebdfdaeextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
429 - octave_value_list vout = feval (vmebdfdaeodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
430 + octave_value_list vout = octave::feval (vmebdfdaeodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
431
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
432 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
433 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
434 @@ -317,8 +317,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
435 if (nargin >= 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
436
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
437 // Fourth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
438 - if (!args(3).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
439 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
440 + if (!args(3).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
441 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
442 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
443 for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
444 vmebdfdaeextarg(vcnt-3) = args(vcnt); // Save arguments in vmebdfdaeextarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
445 @@ -328,7 +328,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
446 else if (nargin > 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
447 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
448 varin(0) = args(3); varin(1) = "odebda";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
449 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
450 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
451 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
452 vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
453 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
454 @@ -339,7 +339,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
455 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
456 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
457 varin(0) = args(3); varin(1) = "odebda"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
458 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
459 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
460 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
461 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
462 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
463 @@ -347,7 +347,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
464 } // if (nargin >= 4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
465
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
466 else { // if nargin == 3, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
467 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
468 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
469 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
470 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
471
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
472 @@ -359,7 +359,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
473 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
474 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
475 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
476 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
477 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
478 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
479 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
480 "Option \"RelTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
481 @@ -376,7 +376,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
482 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
483 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
484 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
485 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
486 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
487 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
488 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
489 "Option \"AbsTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
490 @@ -401,7 +401,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
491 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
492 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
493 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
494 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
495 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
496 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
497 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
498 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
499 @@ -409,14 +409,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
500 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
501 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
502 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
503 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
504 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
505 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
506 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
507
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
508 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
509 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
510 octave_value vplot = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
511 - if (vplot.is_empty () && nargout == 0) vplot = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
512 + if (vplot.isempty () && nargout == 0) vplot = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
513
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
514 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
515 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
516 @@ -437,12 +437,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
517 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
518 octave_value vinitstep = vodeopt.contents ("InitialStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
519 if (args(1).length () > 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
520 - if (!vinitstep.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
521 + if (!vinitstep.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
522 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
523 "Option \"InitialStep\" will be ignored if fixed time stamps are given");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
524 vinitstep = args(1).vector_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
525 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
526 - if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
527 + if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
528 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
529 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
530 "Option \"InitialStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
531 @@ -452,7 +452,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
532 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
533 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
534 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
535 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
536 + if (vmaxstep.isempty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
537 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
538 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
539 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
540 @@ -468,7 +468,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
541 // The options 'Jacobian', 'JPattern' and 'Vectorized'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
542 octave_value vjac = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
543 octave_idx_type vmebdfdaejac = 22; // We need to set this if no Jac available
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
544 - if (!vjac.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
545 + if (!vjac.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
546 vmebdfdaejacfun = vjac; vmebdfdaejac = 21;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
547 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
548
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
549 @@ -476,7 +476,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
550 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
551 vmebdfdaemass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
552 octave_idx_type vmebdfdaemas = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
553 - if (!vmebdfdaemass.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
554 + if (!vmebdfdaemass.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
555 vmebdfdaemas = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
556 if (vmebdfdaemass.is_function_handle () || vmebdfdaemass.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
557 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
558 @@ -486,7 +486,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
559 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
560 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
561 vmebdfdaemassstate = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
562 - if (!vmebdfdaemassstate.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
563 + if (!vmebdfdaemassstate.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
564 if (vmebdfdaemassstate.string_value ().compare ("weak") != 0) // 'weak' is default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
565 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
566 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
567 @@ -494,14 +494,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
568 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
569 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
570 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
571 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
572 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
573 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
574 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
575
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
576 // The option MassSingular will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
577 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
578 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
579 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
580 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
581 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
582 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
583 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
584 @@ -509,14 +509,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
585 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
586 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
587 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
588 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
589 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
590 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
591 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
592
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
593 // Implementation of the option MaxOrder has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
594 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
595 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
596 - if (vmaxder.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
597 + if (vmaxder.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
598 vmaxder = 3;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
599 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
600 "Option \"MaxOrder\" not set, new value %1d is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
601 @@ -540,12 +540,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
602 // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
603 // CAN HANDLE THESE OPTIONS
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
604 octave_value vntol = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
605 - if (!vntol.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
606 + if (!vntol.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
607 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
608 "Option \"NewtonTol\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
609 octave_value vmaxnewton =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
610 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
611 - if (!vmaxnewton.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
612 + if (!vmaxnewton.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
613 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
614 "Option \"MaxNewtonIterations\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
615
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
616 @@ -563,7 +563,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
617 double HO = vinitstep.double_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
618 double *Y0 = vY0.fortran_vec ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
619 double TOUT = T0 + vinitstep.double_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
620 - double TEND = vTIME(vTIME.length ()-1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
621 + double TEND = vTIME(vTIME.numel ()-1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
622
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
623 octave_idx_type MF = vmebdfdaejac;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
624 octave_idx_type IDID = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
625 @@ -578,7 +578,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
626 IWORK[vcnt] = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
627 octave_idx_type MBND[4] = {N, N, N, N};
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
628 octave_idx_type MASBND[4] = {0, N, 0, N};
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
629 - if (!vmebdfdaemass.is_empty ()) MASBND[0] = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
630 + if (!vmebdfdaemass.isempty ()) MASBND[0] = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
631 octave_idx_type MAXDER = vmaxder.int_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
632 octave_idx_type ITOL = vitol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
633 double *RTOL = vRTOL.fortran_vec ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
634 @@ -596,9 +596,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
635 // etc. and initialize the plot, events and the solstore functions
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
636 octave_value vtim (T0); octave_value vsol (vY0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
637 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
638 - if (!vplot.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
639 + if (!vplot.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
640 (vplot, voutsel, args(1), args(2), vmebdfdaeextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
641 - if (!vevents.is_empty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
642 + if (!vevents.isempty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
643 (vevents, vtim, args(2), vmebdfdaeextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
644
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
645 // We are calling the core solver here to intialize all variables
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
646 @@ -618,7 +618,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
647 // core solver function and before calling the plot function
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
648 ColumnVector vcres(N);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
649
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
650 - if (vTIME.length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
651 + if (vTIME.numel () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
652 // Before we are entering the solver loop replace the first time
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
653 // stamp value with FirstStep = (InitTime - InitStep)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
654 TOUT = TOUT - vinitstep.double_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
655 @@ -649,18 +649,18 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
656 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
657 vcres(vcnt) = Y0[vcnt];
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
658 vsol = vcres; vtim = TOUT;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
659 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
660 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
661 veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vmebdfdaeextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
662 - if (!veveres(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
663 + if (!veveres(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
664 if (veveres(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
665 ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
666 Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
667 - vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
668 + vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
669 vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
670 TOUT = TEND; // let's get out here, the Events function told us to finish
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
671 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
672 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
673 - if (!vplot.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
674 + if (!vplot.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
675 if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfdaeextarg, 1)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
676 error ("Missing error message implementation");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
677 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
678 @@ -671,7 +671,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
679 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
680 else { // if (vTIME.length () > 2) we have all the time values needed
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
681 volatile octave_idx_type vtimecnt = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
682 - octave_idx_type vtimelen = vTIME.length ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
683 + octave_idx_type vtimelen = vTIME.numel ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
684 while (vtimecnt < vtimelen) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
685 vtimecnt++; TOUT = vTIME(vtimecnt-1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
686
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
687 @@ -696,18 +696,18 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
688 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
689 vcres(vcnt) = Y0[vcnt];
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
690 vsol = vcres; vtim = TOUT;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
691 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
692 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
693 veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vmebdfdaeextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
694 - if (!veveres(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
695 + if (!veveres(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
696 if (veveres(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
697 ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
698 Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
699 - vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
700 + vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
701 vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
702 vtimecnt = vtimelen; // let's get out here, the Events function told us to finish
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
703 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
704 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
705 - if (!vplot.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
706 + if (!vplot.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
707 if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfdaeextarg, 1)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
708 error ("Missing error message implementation");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
709 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
710 @@ -725,9 +725,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
711 // needed to call the OdePkg output function one last time again
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
712 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++) vcres(vcnt) = Y0[vcnt];
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
713 vsol = vcres; vtim = TOUT;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
714 - if (!vevents.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
715 + if (!vevents.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
716 odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vmebdfdaeextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
717 - if (!vplot.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
718 + if (!vplot.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
719 odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfdaeextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
720
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
721 // Return the results that have been stored in the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
722 @@ -761,7 +761,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
723 vretmap.assign ("solver", "odebda");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
724 if (vstats.string_value () == "on")
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
725 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
726 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
727 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
728 vretmap.assign ("ie", veveres(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
729 vretmap.assign ("xe", veveres(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
730 vretmap.assign ("ye", veveres(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
731 @@ -779,7 +779,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
732 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
733 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
734 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
735 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
736 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
737 vretval(2) = veveres(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
738 vretval(3) = veveres(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
739 vretval(4) = veveres(0).cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
740 diff -r 1646adc7793b src/odepkg_octsolver_mebdfi.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
741 --- a/src/odepkg_octsolver_mebdfi.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
742 +++ b/src/odepkg_octsolver_mebdfi.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
743 @@ -162,7 +162,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
744 varin(0) = T; varin(1) = A; varin(2) = APRIME;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
745 for (octave_idx_type vcnt = 0; vcnt < vmebdfiextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
746 varin(vcnt+3) = vmebdfiextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
747 - octave_value_list vout = feval (vmebdfiodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
748 + octave_value_list vout = octave::feval (vmebdfiodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
749
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
750 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
751 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
752 @@ -397,7 +397,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
753
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
754 // Check if the third and the fourth input argument (check for
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
755 // vector already was successful before) have the same length
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
756 - if (args(2).length () != args(3).length ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
757 + if (args(2).numel () != args(3).numel ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
758 error_with_id ("OdePkg:InvalidArgument",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
759 "Third and fourth input argument must have the same length");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
760 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
761 @@ -409,8 +409,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
762 if (nargin >= 5) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
763
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
764 // Fifth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
765 - if (!args(4).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
766 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
767 + if (!args(4).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
768 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
769 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
770 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
771 vmebdfiextarg(vcnt-4) = args(vcnt); // Save arguments in vmebdfiextarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
772 @@ -420,7 +420,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
773 else if (nargin > 5) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
774 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
775 varin(0) = args(4); varin(1) = "odebdi";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
776 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
777 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
778 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
779 vodeopt = tmp(0).scalar_map_value (); // Create structure of args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
780 for (octave_idx_type vcnt = 5; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
781 @@ -431,7 +431,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
782 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
783 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
784 varin(0) = args(4); varin(1) = "odebdi"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
785 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
786 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
787 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
788 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
789 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
790 @@ -439,7 +439,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
791 } // if (nargin >= 5)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
792
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
793 else { // if nargin == 4, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
794 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
795 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
796 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
797 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
798
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
799 @@ -451,14 +451,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
800 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
801 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
802 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
803 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
804 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
805 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
806 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
807 "Option \"RelTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
808 vreltol.double_value ());
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
809 } // vreltol.print (octave_stdout, true); return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
810 if (!vreltol.is_scalar_type ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
811 - if (vreltol.length () != args(2).length ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
812 + if (vreltol.numel () != args(2).numel ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
813 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
814 "Length of option \"RelTol\" must be the same as the number of equations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
815 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
816 @@ -468,14 +468,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
817 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
818 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
819 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
820 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
821 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
822 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
823 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
824 "Option \"AbsTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
825 vabstol.double_value ());
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
826 } // vabstol.print (octave_stdout, true); return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
827 if (!vabstol.is_scalar_type ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
828 - if (vabstol.length () != args(2).length ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
829 + if (vabstol.numel () != args(2).numel ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
830 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
831 "Length of option \"AbsTol\" must be the same as the number of equations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
832 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
833 @@ -493,7 +493,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
834 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
835 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
836 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
837 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
838 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
839 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
840 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
841 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
842 @@ -501,14 +501,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
843 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
844 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
845 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
846 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
847 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
848 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
849 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
850
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
851 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
852 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
853 octave_value vplot = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
854 - if (vplot.is_empty () && nargout == 0) vplot = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
855 + if (vplot.isempty () && nargout == 0) vplot = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
856
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
857 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
858 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
859 @@ -528,13 +528,13 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
860 // Implementation of the option InitialStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
861 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
862 octave_value vinitstep = vodeopt.contents ("InitialStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
863 - if (args(1).length () > 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
864 - if (!vinitstep.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
865 + if (args(1).numel () > 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
866 + if (!vinitstep.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
867 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
868 "Option \"InitialStep\" will be ignored if fixed time stamps are given");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
869 vinitstep = args(1).vector_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
870 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
871 - if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
872 + if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
873 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
874 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
875 "Option \"InitialStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
876 @@ -544,7 +544,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
877 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
878 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
879 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
880 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
881 + if (vmaxstep.isempty () && args(1).numel () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
882 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
883 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
884 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
885 @@ -560,21 +560,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
886 // The options 'Jacobian', 'JPattern' and 'Vectorized'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
887 octave_value vjac = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
888 octave_idx_type vmebdfijac = 22; // We need to set this if no Jac available
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
889 - if (!vjac.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
890 + if (!vjac.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
891 vmebdfijacfun = vjac; vmebdfijac = 21;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
892 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
893
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
894 // The option Mass will be ignored by this solver. We can't handle
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
895 // Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
896 octave_value vmass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
897 - if (!vmass.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
898 + if (!vmass.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
899 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
900 "Option \"Mass\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
901
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
902 // The option MStateDependence will be ignored by this solver. We
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
903 // can't handle Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
904 octave_value vmst = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
905 - if (!vmst.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
906 + if (!vmst.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
907 if (vmst.string_value ().compare ("weak") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
908 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
909 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
910 @@ -582,14 +582,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
911 // The option MvPattern will be ignored by this solver. We
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
912 // can't handle Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
913 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
914 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
915 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
916 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
917 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
918
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
919 // The option MvPattern will be ignored by this solver. We
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
920 // can't handle Mass-matrix options with IDE problems
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
921 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
922 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
923 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
924 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
925 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
926 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
927 @@ -597,14 +597,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
928 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
929 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
930 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
931 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
932 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
933 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
934 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
935
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
936 // Implementation of the option MaxOrder has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
937 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
938 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
939 - if (vmaxder.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
940 + if (vmaxder.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
941 vmaxder = 3;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
942 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
943 "Option \"MaxOrder\" not set, new value %1d is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
944 @@ -628,12 +628,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
945 // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
946 // CAN HANDLE THESE OPTIONS
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
947 octave_value vntol = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
948 - if (!vntol.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
949 + if (!vntol.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
950 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
951 "Option \"NewtonTol\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
952 octave_value vmaxnewton =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
953 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
954 - if (!vmaxnewton.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
955 + if (!vmaxnewton.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
956 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
957 "Option \"MaxNewtonIterations\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
958
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
959 @@ -647,13 +647,13 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
960 NDArray vY0 = args(2).array_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
961 NDArray vYPRIME = args(3).array_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
962
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
963 - octave_idx_type N = args(2).length ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
964 + octave_idx_type N = args(2).numel ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
965 double T0 = vTIME(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
966 double HO = vinitstep.double_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
967 double *Y0 = vY0.fortran_vec ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
968 double *YPRIME = vYPRIME.fortran_vec ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
969 double TOUT = T0 + vinitstep.double_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
970 - double TEND = vTIME(vTIME.length ()-1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
971 + double TEND = vTIME(vTIME.numel ()-1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
972
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
973 octave_idx_type MF = vmebdfijac;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
974 octave_idx_type IDID = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
975 @@ -682,14 +682,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
976 // etc. and initialize the plot, events and the solstore functions
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
977 octave_value vtim (T0); octave_value vsol (vY0); octave_value vyds (vYPRIME);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
978 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
979 - if (!vplot.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
980 + if (!vplot.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
981 (vplot, voutsel, args(1), args(2), vmebdfiextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
982
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
983 octave_value_list veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
984 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
985 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
986 Cell veveidearg (veveideargs);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
987 - if (!vevents.is_empty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
988 + if (!vevents.isempty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
989 (vevents, vtim, veveidearg, vmebdfiextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
990
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
991 // We are calling the core solver here to intialize all variables
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
992 @@ -710,7 +710,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
993 ColumnVector vcres(N);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
994 ColumnVector vydrs(N);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
995
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
996 - if (vTIME.length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
997 + if (vTIME.numel () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
998 // Before we are entering the solver loop replace the first time
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
999 // stamp value with FirstStep = (InitTime - InitStep)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1000 TOUT = TOUT - vinitstep.double_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1001 @@ -742,21 +742,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1002 vcres(vcnt) = Y0[vcnt]; vydrs(vcnt) = YPRIME[vcnt];
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1003 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1004 vsol = vcres; vyds = vydrs; vtim = TOUT;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1005 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1006 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1007 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1008 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1009 veveidearg = veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1010 veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vmebdfiextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1011 - if (!veveres(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1012 + if (!veveres(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1013 if (veveres(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1014 ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1015 Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1016 - vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1017 + vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1018 vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1019 TOUT = TEND; // let's get out here, the Events function told us to finish
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1020 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1021 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1022 - if (!vplot.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1023 + if (!vplot.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1024 if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfiextarg, 1)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1025 error ("Missing error message implementation");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1026 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1027 @@ -765,9 +765,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1028 odepkg_auxiliary_solstore (vtim, vsol, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1029 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1030 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1031 - else { // if (vTIME.length () > 2) we have all the time values needed
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1032 + else { // if (vTIME.numel () > 2) we have all the time values needed
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1033 volatile octave_idx_type vtimecnt = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1034 - octave_idx_type vtimelen = vTIME.length () - 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1035 + octave_idx_type vtimelen = vTIME.numel () - 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1036 while (vtimecnt < vtimelen) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1037 vtimecnt++; TOUT = vTIME(vtimecnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1038
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1039 @@ -793,21 +793,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1040 vcres(vcnt) = Y0[vcnt]; vydrs(vcnt) = YPRIME[vcnt];
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1041 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1042 vsol = vcres; vyds = vydrs; vtim = TOUT;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1043 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1044 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1045 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1046 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1047 veveidearg = veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1048 veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vmebdfiextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1049 - if (!veveres(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1050 + if (!veveres(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1051 if (veveres(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1052 ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1053 Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1054 - vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1055 + vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1056 vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1057 vtimecnt = vtimelen; // let's get out here, the Events function told us to finish
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1058 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1059 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1060 - if (!vplot.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1061 + if (!vplot.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1062 if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfiextarg, 1)) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1063 error ("Missing error message implementation");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1064 return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1065 @@ -830,9 +830,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1066 veveideargs(0) = vsol;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1067 veveideargs(1) = vyds;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1068 veveidearg = veveideargs;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1069 - if (!vevents.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1070 + if (!vevents.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1071 odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vmebdfiextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1072 - if (!vplot.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1073 + if (!vplot.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1074 odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfiextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1075
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1076 // Return the results that have been stored in the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1077 @@ -866,7 +866,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1078 vretmap.assign ("solver", "odebdi");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1079 if (vstats.string_value () == "on")
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1080 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1081 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1082 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1083 vretmap.assign ("ie", veveres(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1084 vretmap.assign ("xe", veveres(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1085 vretmap.assign ("ye", veveres(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1086 @@ -884,7 +884,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1087 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1088 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1089 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1090 - if (!vevents.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1091 + if (!vevents.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1092 vretval(2) = veveres(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1093 vretval(3) = veveres(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1094 vretval(4) = veveres(0).cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1095 diff -r 1646adc7793b src/odepkg_octsolver_radau.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1096 --- a/src/odepkg_octsolver_radau.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1097 +++ b/src/odepkg_octsolver_radau.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1098 @@ -114,7 +114,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1099 varin(0) = X; varin(1) = A;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1100 for (octave_idx_type vcnt = 0; vcnt < vradauextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1101 varin(vcnt+2) = vradauextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1102 - octave_value_list vout = feval (vradauodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1103 + octave_value_list vout = octave::feval (vradauodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1104
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1105 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1106 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1107 @@ -200,14 +200,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1108 octave_value vy = octave_value (A);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1109
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1110 // Check if an 'Events' function has been set by the user
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1111 - if (!vradauevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1112 + if (!vradauevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1113 vradauevesol = odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1114 (vradauevefun, vt, vy, vradauextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1115 - if (!vradauevesol(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1116 + if (!vradauevesol(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1117 if (vradauevesol(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1118 ColumnVector vttmp = vradauevesol(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1119 Matrix vrtmp = vradauevesol(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1120 - vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1121 + vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1122 vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1123 IRTRN = (vradauevesol(0).cell_value ()(0).int_value () ? -1 : 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1124 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1125 @@ -219,7 +219,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1126
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1127 // Check if an 'OutputFcn' has been set by the user (including the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1128 // values of the options for 'OutputSel' and 'Refine')
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1129 - if (!vradaupltfun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1130 + if (!vradaupltfun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1131 if (vradaurefine.int_value () > 0) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1132 ColumnVector B(N); double vtb = 0.0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1133 for (octave_idx_type vcnt = 1; vcnt < vradaurefine.int_value (); vcnt++) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1134 @@ -320,8 +320,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1135 if (nargin >= 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1136
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1137 // Fourth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1138 - if (!args(3).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1139 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1140 + if (!args(3).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1141 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1142 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1143 for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1144 vradauextarg(vcnt-3) = args(vcnt); // Save arguments in vradauextarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1145 @@ -331,7 +331,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1146 else if (nargin > 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1147 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1148 varin(0) = args(3); varin(1) = "ode2r";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1149 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1150 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1151 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1152 vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1153 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1154 @@ -342,7 +342,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1155 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1156 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1157 varin(0) = args(3); varin(1) = "ode2r"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1158 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1159 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1160 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1161 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1162 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1163 @@ -350,7 +350,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1164 } // if (nargin >= 4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1165
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1166 else { // if nargin == 3, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1167 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1168 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1169 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1170 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1171
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1172 @@ -362,7 +362,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1173 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1174 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1175 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1176 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1177 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1178 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1179 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1180 "Option \"RelTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1181 @@ -379,7 +379,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1182 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1183 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1184 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1185 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1186 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1187 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1188 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1189 "Option \"AbsTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1190 @@ -409,7 +409,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1191 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1192 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1193 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1194 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1195 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1196 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1197 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1198 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1199 @@ -417,14 +417,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1200 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1201 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1202 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1203 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1204 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1205 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1206 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1207
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1208 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1209 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1210 vradaupltfun = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1211 - if (vradaupltfun.is_empty () && nargout == 0) vradaupltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1212 + if (vradaupltfun.isempty () && nargout == 0) vradaupltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1213
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1214 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1215 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1216 @@ -445,7 +445,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1217 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1218 "Fixed time stamps are not supported by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1219 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1220 - if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1221 + if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1222 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1223 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1224 "Option \"InitialStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1225 @@ -455,7 +455,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1226 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1227 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1228 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1229 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1230 + if (vmaxstep.isempty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1231 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1232 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1233 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1234 @@ -471,19 +471,19 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1235 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1236 vradaujacfun = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1237 octave_idx_type vradaujac = 0; // We need to set this if no Jac available
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1238 - if (!vradaujacfun.is_empty ()) vradaujac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1239 + if (!vradaujacfun.isempty ()) vradaujac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1240
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1241 // The option JPattern will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1242 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1243 octave_value vradaujacpat = vodeopt.contents ("JPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1244 - if (!vradaujacpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1245 + if (!vradaujacpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1246 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1247 "Option \"JPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1248
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1249 // The option Vectorized will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1250 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1251 octave_value vradauvectorize = vodeopt.contents ("Vectorized");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1252 - if (!vradauvectorize.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1253 + if (!vradauvectorize.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1254 if (vradauvectorize.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1255 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1256 "Option \"Vectorized\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1257 @@ -492,7 +492,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1258 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1259 vradaumass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1260 octave_idx_type vradaumas = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1261 - if (!vradaumass.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1262 + if (!vradaumass.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1263 vradaumas = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1264 if (vradaumass.is_function_handle () || vradaumass.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1265 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1266 @@ -502,7 +502,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1267 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1268 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1269 vradaumassstate = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1270 - if (!vradaumassstate.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1271 + if (!vradaumassstate.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1272 if (vradaumassstate.string_value ().compare ("weak") != 0) // 'weak' is default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1273 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1274 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1275 @@ -510,14 +510,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1276 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1277 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1278 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1279 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1280 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1281 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1282 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1283
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1284 // The option MassSingular will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1285 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1286 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1287 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1288 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1289 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1290 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1291 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1292 @@ -525,21 +525,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1293 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1294 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1295 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1296 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1297 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1298 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1299 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1300
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1301 // The option MaxOrder will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1302 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1303 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1304 - if (!vmaxder.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1305 + if (!vmaxder.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1306 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1307 "Option \"MaxOrder\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1308
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1309 // The option BDF will be ignored by this solver, the core Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1310 // solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1311 octave_value vbdf = vodeopt.contents ("BDF");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1312 - if (!vbdf.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1313 + if (!vbdf.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1314 if (vbdf.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1315 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1316 "Option \"BDF\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1317 @@ -548,12 +548,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1318 // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1319 // CAN HANDLE THESE OPTIONS
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1320 octave_value vntol = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1321 - if (!vntol.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1322 + if (!vntol.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1323 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1324 "Option \"NewtonTol\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1325 octave_value vmaxnewton =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1326 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1327 - if (!vmaxnewton.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1328 + if (!vmaxnewton.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1329 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1330 "Option \"MaxNewtonIterations\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1331
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1332 @@ -600,9 +600,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1333 octave_value vtim = args(1).vector_value ()(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1334 octave_value vsol = args(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1335 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1336 - if (!vradaupltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1337 + if (!vradaupltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1338 (vradaupltfun, vradauoutsel, args(1), args(2), vradauextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1339 - if (!vradauevefun.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1340 + if (!vradauevefun.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1341 odepkg_auxiliary_evaleventfun (vradauevefun, vtim, args(2), vradauextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1342
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1343 // We are calling the core solver and solve the set of ODEs or DAEs
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1344 @@ -639,9 +639,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1345 octave_value vted = octave_value (XEND);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1346 octave_value vfin = octave_value (vlastline);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1347
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1348 - if (!vradaupltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1349 + if (!vradaupltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1350 (vradaupltfun, vradauoutsel, vted, vfin, vradauextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1351 - if (!vradauevefun.is_empty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1352 + if (!vradauevefun.isempty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1353 (vradauevefun, vted, vfin, vradauextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1354
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1355 // Get the stats information as an octave_scalar_map if the option 'Stats'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1356 @@ -667,9 +667,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1357 vretmap.assign ("x", vtres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1358 vretmap.assign ("y", vyres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1359 vretmap.assign ("solver", "ode2r");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1360 - if (!vstatinfo.is_empty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1361 + if (!vstatinfo.isempty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1362 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1363 - if (!vradauevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1364 + if (!vradauevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1365 vretmap.assign ("ie", vradauevesol(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1366 vretmap.assign ("xe", vradauevesol(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1367 vretmap.assign ("ye", vradauevesol(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1368 @@ -687,7 +687,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1369 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1370 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1371 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1372 - if (!vradauevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1373 + if (!vradauevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1374 vretval(2) = vradauevesol(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1375 vretval(3) = vradauevesol(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1376 vretval(4) = vradauevesol(0).cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1377 diff -r 1646adc7793b src/odepkg_octsolver_radau5.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1378 --- a/src/odepkg_octsolver_radau5.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1379 +++ b/src/odepkg_octsolver_radau5.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1380 @@ -114,7 +114,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1381 varin(0) = X; varin(1) = A;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1382 for (octave_idx_type vcnt = 0; vcnt < vradau5extarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1383 varin(vcnt+2) = vradau5extarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1384 - octave_value_list vout = feval (vradau5odefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1385 + octave_value_list vout = octave::feval (vradau5odefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1386
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1387 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1388 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1389 @@ -200,14 +200,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1390 octave_value vy = octave_value (A);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1391
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1392 // Check if an 'Events' function has been set by the user
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1393 - if (!vradau5evefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1394 + if (!vradau5evefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1395 vradau5evesol = odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1396 (vradau5evefun, vt, vy, vradau5extarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1397 - if (!vradau5evesol(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1398 + if (!vradau5evesol(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1399 if (vradau5evesol(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1400 ColumnVector vttmp = vradau5evesol(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1401 Matrix vrtmp = vradau5evesol(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1402 - vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1403 + vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1404 vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1405 IRTRN = (vradau5evesol(0).cell_value ()(0).int_value () ? -1 : 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1406 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1407 @@ -219,7 +219,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1408
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1409 // Check if an 'OutputFcn' has been set by the user (including the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1410 // values of the options for 'OutputSel' and 'Refine')
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1411 - if (!vradau5pltfun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1412 + if (!vradau5pltfun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1413 if (vradau5refine.int_value () > 0) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1414 ColumnVector B(N); double vtb = 0.0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1415 for (octave_idx_type vcnt = 1; vcnt < vradau5refine.int_value (); vcnt++) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1416 @@ -320,8 +320,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1417 if (nargin >= 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1418
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1419 // Fourth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1420 - if (!args(3).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1421 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1422 + if (!args(3).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1423 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1424 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1425 for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1426 vradau5extarg(vcnt-3) = args(vcnt); // Save arguments in vradau5extarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1427 @@ -331,7 +331,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1428 else if (nargin > 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1429 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1430 varin(0) = args(3); varin(1) = "ode5r";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1431 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1432 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1433 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1434 vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1435 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1436 @@ -342,7 +342,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1437 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1438 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1439 varin(0) = args(3); varin(1) = "ode5r"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1440 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1441 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1442 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1443 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1444 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1445 @@ -350,7 +350,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1446 } // if (nargin >= 4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1447
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1448 else { // if nargin == 3, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1449 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1450 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1451 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1452 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1453
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1454 @@ -362,7 +362,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1455 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1456 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1457 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1458 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1459 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1460 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1461 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1462 "Option \"RelTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1463 @@ -379,7 +379,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1464 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1465 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1466 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1467 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1468 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1469 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1470 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1471 "Option \"AbsTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1472 @@ -409,7 +409,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1473 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1474 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1475 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1476 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1477 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1478 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1479 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1480 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1481 @@ -417,14 +417,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1482 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1483 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1484 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1485 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1486 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1487 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1488 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1489
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1490 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1491 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1492 vradau5pltfun = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1493 - if (vradau5pltfun.is_empty () && nargout == 0) vradau5pltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1494 + if (vradau5pltfun.isempty () && nargout == 0) vradau5pltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1495
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1496 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1497 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1498 @@ -445,7 +445,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1499 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1500 "Fixed time stamps are not supported by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1501 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1502 - if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1503 + if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1504 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1505 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1506 "Option \"InitialStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1507 @@ -455,7 +455,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1508 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1509 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1510 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1511 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1512 + if (vmaxstep.isempty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1513 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1514 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1515 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1516 @@ -471,19 +471,19 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1517 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1518 vradau5jacfun = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1519 octave_idx_type vradau5jac = 0; // We need to set this if no Jac available
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1520 - if (!vradau5jacfun.is_empty ()) vradau5jac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1521 + if (!vradau5jacfun.isempty ()) vradau5jac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1522
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1523 // The option JPattern will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1524 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1525 octave_value vradau5jacpat = vodeopt.contents ("JPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1526 - if (!vradau5jacpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1527 + if (!vradau5jacpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1528 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1529 "Option \"JPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1530
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1531 // The option Vectorized will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1532 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1533 octave_value vradau5vectorize = vodeopt.contents ("Vectorized");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1534 - if (!vradau5vectorize.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1535 + if (!vradau5vectorize.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1536 if (vradau5vectorize.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1537 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1538 "Option \"Vectorized\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1539 @@ -492,7 +492,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1540 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1541 vradau5mass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1542 octave_idx_type vradau5mas = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1543 - if (!vradau5mass.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1544 + if (!vradau5mass.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1545 vradau5mas = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1546 if (vradau5mass.is_function_handle () || vradau5mass.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1547 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1548 @@ -502,7 +502,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1549 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1550 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1551 vradau5massstate = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1552 - if (!vradau5massstate.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1553 + if (!vradau5massstate.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1554 if (vradau5massstate.string_value ().compare ("weak") != 0) // 'weak' is default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1555 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1556 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1557 @@ -510,14 +510,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1558 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1559 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1560 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1561 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1562 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1563 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1564 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1565
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1566 // The option MassSingular will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1567 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1568 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1569 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1570 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1571 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1572 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1573 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1574 @@ -525,21 +525,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1575 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1576 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1577 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1578 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1579 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1580 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1581 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1582
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1583 // The option MaxOrder will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1584 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1585 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1586 - if (!vmaxder.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1587 + if (!vmaxder.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1588 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1589 "Option \"MaxOrder\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1590
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1591 // The option BDF will be ignored by this solver, the core Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1592 // solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1593 octave_value vbdf = vodeopt.contents ("BDF");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1594 - if (!vbdf.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1595 + if (!vbdf.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1596 if (vbdf.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1597 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1598 "Option \"BDF\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1599 @@ -547,7 +547,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1600 // Implementation of the option NewtonTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1601 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1602 octave_value vNTOL = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1603 - if (vNTOL.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1604 + if (vNTOL.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1605 vNTOL = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1606 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1607 "Option \"NewtonTol\" not set, default value is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1608 @@ -557,7 +557,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1609 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1610 octave_value vmaxnit =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1611 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1612 - if (vmaxnit.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1613 + if (vmaxnit.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1614 vmaxnit = 7; warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1615 "Option \"MaxNewtonIterations\" not set, default value 7 is used");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1616 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1617 @@ -611,9 +611,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1618 octave_value vtim = args(1).vector_value ()(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1619 octave_value vsol = args(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1620 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1621 - if (!vradau5pltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1622 + if (!vradau5pltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1623 (vradau5pltfun, vradau5outsel, args(1), args(2), vradau5extarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1624 - if (!vradau5evefun.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1625 + if (!vradau5evefun.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1626 odepkg_auxiliary_evaleventfun (vradau5evefun, vtim, args(2), vradau5extarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1627
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1628 // octave_stdout << "X VALUE=" << X << XEND << std::endl;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1629 @@ -651,9 +651,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1630 octave_value vted = octave_value (XEND);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1631 octave_value vfin = octave_value (vlastline);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1632
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1633 - if (!vradau5pltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1634 + if (!vradau5pltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1635 (vradau5pltfun, vradau5outsel, vted, vfin, vradau5extarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1636 - if (!vradau5evefun.is_empty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1637 + if (!vradau5evefun.isempty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1638 (vradau5evefun, vted, vfin, vradau5extarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1639
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1640 // Get the stats information as an octave_scalar_map if the option 'Stats'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1641 @@ -679,9 +679,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1642 vretmap.assign ("x", vtres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1643 vretmap.assign ("y", vyres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1644 vretmap.assign ("solver", "ode5r");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1645 - if (!vstatinfo.is_empty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1646 + if (!vstatinfo.isempty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1647 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1648 - if (!vradau5evefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1649 + if (!vradau5evefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1650 vretmap.assign ("ie", vradau5evesol(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1651 vretmap.assign ("xe", vradau5evesol(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1652 vretmap.assign ("ye", vradau5evesol(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1653 @@ -699,7 +699,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1654 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1655 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1656 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1657 - if (!vradau5evefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1658 + if (!vradau5evefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1659 vretval(2) = vradau5evesol(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1660 vretval(3) = vradau5evesol(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1661 vretval(4) = vradau5evesol(0).cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1662 diff -r 1646adc7793b src/odepkg_octsolver_rodas.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1663 --- a/src/odepkg_octsolver_rodas.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1664 +++ b/src/odepkg_octsolver_rodas.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1665 @@ -293,7 +293,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1666 varin(0) = X; varin(1) = A;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1667 for (octave_idx_type vcnt = 0; vcnt < vrodasextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1668 varin(vcnt+2) = vrodasextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1669 - octave_value_list vout = feval (vrodasodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1670 + octave_value_list vout = octave::feval (vrodasodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1671
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1672 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1673 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1674 @@ -401,14 +401,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1675 octave_value vy = octave_value (A);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1676
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1677 // Check if an 'Events' function has been set by the user
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1678 - if (!vrodasevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1679 + if (!vrodasevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1680 vrodasevesol = odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1681 (vrodasevefun, vt, vy, vrodasextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1682 - if (!vrodasevesol(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1683 + if (!vrodasevesol(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1684 if (vrodasevesol(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1685 ColumnVector vttmp = vrodasevesol(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1686 Matrix vrtmp = vrodasevesol(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1687 - vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1688 + vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1689 vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1690 IRTRN = (vrodasevesol(0).cell_value ()(0).int_value () ? -1 : 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1691 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1692 @@ -420,7 +420,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1693
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1694 // Check if an 'OutputFcn' has been set by the user (including the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1695 // values of the options for 'OutputSel' and 'Refine')
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1696 - if (!vrodaspltfun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1697 + if (!vrodaspltfun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1698 if (vrodasrefine.int_value () > 0) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1699 ColumnVector B(N); double vtb = 0.0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1700 for (octave_idx_type vcnt = 1; vcnt < vrodasrefine.int_value (); vcnt++) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1701 @@ -534,8 +534,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1702 if (nargin >= 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1703
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1704 // Fourth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1705 - if (!args(3).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1706 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1707 + if (!args(3).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1708 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1709 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1710 for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1711 vrodasextarg(vcnt-3) = args(vcnt); // Save arguments in vrodasextarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1712 @@ -545,7 +545,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1713 else if (nargin > 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1714 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1715 varin(0) = args(3); varin(1) = "oders";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1716 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1717 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1718 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1719 vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1720 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1721 @@ -556,7 +556,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1722 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1723 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1724 varin(0) = args(3); varin(1) = "oders"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1725 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1726 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1727 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1728 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1729 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1730 @@ -564,7 +564,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1731 } // if (nargin >= 4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1732
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1733 else { // if nargin == 3, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1734 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1735 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1736 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1737 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1738
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1739 @@ -576,7 +576,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1740 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1741 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1742 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1743 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1744 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1745 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1746 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1747 "Option \"RelTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1748 @@ -593,7 +593,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1749 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1750 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1751 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1752 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1753 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1754 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1755 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1756 "Option \"AbsTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1757 @@ -623,7 +623,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1758 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1759 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1760 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1761 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1762 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1763 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1764 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1765 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1766 @@ -631,14 +631,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1767 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1768 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1769 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1770 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1771 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1772 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1773 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1774
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1775 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1776 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1777 vrodaspltfun = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1778 - if (vrodaspltfun.is_empty () && nargout == 0) vrodaspltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1779 + if (vrodaspltfun.isempty () && nargout == 0) vrodaspltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1780
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1781 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1782 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1783 @@ -659,7 +659,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1784 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1785 "Fixed time stamps are not supported by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1786 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1787 - if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1788 + if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1789 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1790 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1791 "Option \"InitialStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1792 @@ -669,7 +669,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1793 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1794 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1795 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1796 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1797 + if (vmaxstep.isempty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1798 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1799 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1800 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1801 @@ -685,19 +685,19 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1802 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1803 vrodasjacfun = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1804 octave_idx_type vrodasjac = 0; // We need to set this if no Jac available
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1805 - if (!vrodasjacfun.is_empty ()) vrodasjac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1806 + if (!vrodasjacfun.isempty ()) vrodasjac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1807
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1808 // The option JPattern will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1809 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1810 octave_value vrodasjacpat = vodeopt.contents ("JPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1811 - if (!vrodasjacpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1812 + if (!vrodasjacpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1813 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1814 "Option \"JPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1815
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1816 // The option Vectorized will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1817 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1818 octave_value vrodasvectorize = vodeopt.contents ("Vectorized");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1819 - if (!vrodasvectorize.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1820 + if (!vrodasvectorize.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1821 if (vrodasvectorize.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1822 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1823 "Option \"Vectorized\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1824 @@ -706,7 +706,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1825 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1826 vrodasmass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1827 octave_idx_type vrodasmas = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1828 - if (!vrodasmass.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1829 + if (!vrodasmass.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1830 vrodasmas = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1831 if (vrodasmass.is_function_handle () || vrodasmass.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1832 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1833 @@ -716,7 +716,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1834 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1835 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1836 vrodasmassstate = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1837 - if (!vrodasmassstate.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1838 + if (!vrodasmassstate.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1839 if (vrodasmassstate.string_value ().compare ("weak") != 0) // 'weak' is default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1840 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1841 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1842 @@ -724,14 +724,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1843 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1844 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1845 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1846 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1847 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1848 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1849 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1850
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1851 // The option MassSingular will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1852 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1853 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1854 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1855 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1856 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1857 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1858 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1859 @@ -739,21 +739,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1860 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1861 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1862 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1863 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1864 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1865 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1866 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1867
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1868 // The option MaxOrder will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1869 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1870 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1871 - if (!vmaxder.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1872 + if (!vmaxder.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1873 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1874 "Option \"MaxOrder\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1875
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1876 // The option BDF will be ignored by this solver, the core Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1877 // solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1878 octave_value vbdf = vodeopt.contents ("BDF");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1879 - if (!vbdf.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1880 + if (!vbdf.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1881 if (vbdf.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1882 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1883 "Option \"BDF\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1884 @@ -761,12 +761,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1885 // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1886 // CAN HANDLE THESE OPTIONS
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1887 octave_value vntol = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1888 - if (!vntol.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1889 + if (!vntol.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1890 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1891 "Option \"NewtonTol\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1892 octave_value vmaxnewton =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1893 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1894 - if (!vmaxnewton.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1895 + if (!vmaxnewton.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1896 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1897 "Option \"MaxNewtonIterations\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1898
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1899 @@ -813,9 +813,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1900 octave_value vtim = args(1).vector_value ()(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1901 octave_value vsol = args(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1902 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1903 - if (!vrodaspltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1904 + if (!vrodaspltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1905 (vrodaspltfun, vrodasoutsel, args(1), args(2), vrodasextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1906 - if (!vrodasevefun.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1907 + if (!vrodasevefun.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1908 odepkg_auxiliary_evaleventfun (vrodasevefun, vtim, args(2), vrodasextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1909
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1910 // We are calling the core solver and solve the set of ODEs or DAEs
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1911 @@ -852,9 +852,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1912 octave_value vted = octave_value (XEND);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1913 octave_value vfin = octave_value (vlastline);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1914
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1915 - if (!vrodaspltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1916 + if (!vrodaspltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1917 (vrodaspltfun, vrodasoutsel, vted, vfin, vrodasextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1918 - if (!vrodasevefun.is_empty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1919 + if (!vrodasevefun.isempty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1920 (vrodasevefun, vted, vfin, vrodasextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1921
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1922 // Get the stats information as an octave_scalar_map if the option 'Stats'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1923 @@ -879,9 +879,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1924 vretmap.assign ("x", vtres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1925 vretmap.assign ("y", vyres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1926 vretmap.assign ("solver", "oders");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1927 - if (!vstatinfo.is_empty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1928 + if (!vstatinfo.isempty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1929 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1930 - if (!vrodasevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1931 + if (!vrodasevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1932 vretmap.assign ("ie", vrodasevesol(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1933 vretmap.assign ("xe", vrodasevesol(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1934 vretmap.assign ("ye", vrodasevesol(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1935 @@ -899,7 +899,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1936 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1937 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1938 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1939 - if (!vrodasevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1940 + if (!vrodasevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1941 vretval(2) = vrodasevesol(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1942 vretval(3) = vrodasevesol(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1943 vretval(4) = vrodasevesol(0).cell_value ()(1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1944 diff -r 1646adc7793b src/odepkg_octsolver_seulex.cc
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1945 --- a/src/odepkg_octsolver_seulex.cc Sun Jan 20 20:52:16 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1946 +++ b/src/odepkg_octsolver_seulex.cc Sun Jan 20 21:30:32 2019 +0100
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1947 @@ -117,7 +117,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1948 varin(0) = X; varin(1) = A;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1949 for (octave_idx_type vcnt = 0; vcnt < vseulexextarg.length (); vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1950 varin(vcnt+2) = vseulexextarg(vcnt);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1951 - octave_value_list vout = feval (vseulexodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1952 + octave_value_list vout = octave::feval (vseulexodefun.function_value (), varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1953
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1954 // Return the results from the function evaluation to the Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1955 // solver, again copy them and don't just create a Fortran vector
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1956 @@ -205,14 +205,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1957
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1958 vseulexevebrk = false;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1959 // Check if an 'Events' function has been set by the user
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1960 - if (!vseulexevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1961 + if (!vseulexevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1962 vseulexevesol = odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1963 (vseulexevefun, vt, vy, vseulexextarg, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1964 - if (!vseulexevesol(0).cell_value ()(0).is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1965 + if (!vseulexevesol(0).cell_value ()(0).isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1966 if (vseulexevesol(0).cell_value ()(0).int_value () == 1) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1967 ColumnVector vttmp = vseulexevesol(0).cell_value ()(2).column_vector_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1968 Matrix vrtmp = vseulexevesol(0).cell_value ()(3).matrix_value ();
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1969 - vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1970 + vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1971 vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1972 IRTRN = (vseulexevesol(0).cell_value ()(0).int_value () ? -1 : 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1973 vseulexevebrk = true;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1974 @@ -226,7 +226,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1975 // Check if an 'OutputFcn' has been set by the user (including the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1976 // values of the options for 'OutputSel' and 'Refine')
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1977 vseulexpltbrk = false;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1978 - if (!vseulexpltfun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1979 + if (!vseulexpltfun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1980 if (vseulexrefine.int_value () > 0) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1981 ColumnVector B(N); double vtb = 0.0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1982 for (octave_idx_type vcnt = 1; vcnt < vseulexrefine.int_value (); vcnt++) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1983 @@ -328,8 +328,8 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1984 if (nargin >= 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1985
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1986 // Fourth input argument != OdePkg option, need a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1987 - if (!args(3).is_map ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1988 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1989 + if (!args(3).isstruct ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1990 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1991 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1992 for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1993 vseulexextarg(vcnt-3) = args(vcnt); // Save arguments in vseulexextarg
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1994 @@ -339,7 +339,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1995 else if (nargin > 4) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1996 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1997 varin(0) = args(3); varin(1) = "odesx";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1998 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
1999 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2000 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2001 vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2002 for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2003 @@ -350,7 +350,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2004 else {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2005 octave_value_list varin;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2006 varin(0) = args(3); varin(1) = "odesx"; // Check structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2007 - octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2008 + octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2009 if (error_state) return (vretval);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2010 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2011 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2012 @@ -358,7 +358,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2013 } // if (nargin >= 4)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2014
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2015 else { // if nargin == 3, everything else has been checked before
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2016 - octave_value_list tmp = feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2017 + octave_value_list tmp = octave::feval ("odeset", tmp, 1);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2018 vodeopt = tmp(0).scalar_map_value (); // Create a default structure
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2019 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2020
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2021 @@ -370,7 +370,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2022 // Implementation of the option RelTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2023 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2024 octave_value vreltol = vodeopt.contents ("RelTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2025 - if (vreltol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2026 + if (vreltol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2027 vreltol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2028 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2029 "Option \"RelTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2030 @@ -387,7 +387,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2031 // Implementation of the option AbsTol has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2032 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2033 octave_value vabstol = vodeopt.contents ("AbsTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2034 - if (vabstol.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2035 + if (vabstol.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2036 vabstol = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2037 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2038 "Option \"AbsTol\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2039 @@ -417,7 +417,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2040 // The option NormControl will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2041 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2042 octave_value vnorm = vodeopt.contents ("NormControl");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2043 - if (!vnorm.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2044 + if (!vnorm.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2045 if (vnorm.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2046 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2047 "Option \"NormControl\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2048 @@ -425,14 +425,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2049 // The option NonNegative will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2050 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2051 octave_value vnneg = vodeopt.contents ("NonNegative");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2052 - if (!vnneg.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2053 + if (!vnneg.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2054 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2055 "Option \"NonNegative\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2056
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2057 // Implementation of the option OutputFcn has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2058 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2059 vseulexpltfun = vodeopt.contents ("OutputFcn");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2060 - if (vseulexpltfun.is_empty () && nargout == 0) vseulexpltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2061 + if (vseulexpltfun.isempty () && nargout == 0) vseulexpltfun = "odeplot";
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2062
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2063 // Implementation of the option OutputSel has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2064 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2065 @@ -453,7 +453,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2066 error_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2067 "Fixed time stamps are not supported by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2068 }
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2069 - if (vinitstep.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2070 + if (vinitstep.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2071 vinitstep = 1.0e-6;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2072 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2073 "Option \"InitialStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2074 @@ -463,7 +463,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2075 // Implementation of the option MaxStep has been finished, this
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2076 // option can be set by the user to another value than default value
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2077 octave_value vmaxstep = vodeopt.contents ("MaxStep");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2078 - if (vmaxstep.is_empty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2079 + if (vmaxstep.isempty () && args(1).length () == 2) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2080 vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2081 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2082 "Option \"MaxStep\" not set, new value %3.1e is used",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2083 @@ -479,19 +479,19 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2084 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2085 vseulexjacfun = vodeopt.contents ("Jacobian");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2086 octave_idx_type vseulexjac = 0; // We need to set this if no Jac available
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2087 - if (!vseulexjacfun.is_empty ()) vseulexjac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2088 + if (!vseulexjacfun.isempty ()) vseulexjac = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2089
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2090 // The option JPattern will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2091 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2092 octave_value vseulexjacpat = vodeopt.contents ("JPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2093 - if (!vseulexjacpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2094 + if (!vseulexjacpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2095 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2096 "Option \"JPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2097
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2098 // The option Vectorized will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2099 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2100 octave_value vseulexvectorize = vodeopt.contents ("Vectorized");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2101 - if (!vseulexvectorize.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2102 + if (!vseulexvectorize.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2103 if (vseulexvectorize.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2104 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2105 "Option \"Vectorized\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2106 @@ -500,7 +500,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2107 // options can be set by the user to another value than default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2108 vseulexmass = vodeopt.contents ("Mass");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2109 octave_idx_type vseulexmas = 0;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2110 - if (!vseulexmass.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2111 + if (!vseulexmass.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2112 vseulexmas = 1;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2113 if (vseulexmass.is_function_handle () || vseulexmass.is_inline_function ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2114 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2115 @@ -510,7 +510,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2116 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2117 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2118 vseulexmassstate = vodeopt.contents ("MStateDependence");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2119 - if (!vseulexmassstate.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2120 + if (!vseulexmassstate.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2121 if (vseulexmassstate.string_value ().compare ("weak") != 0) // 'weak' is default
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2122 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2123 "Option \"MStateDependence\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2124 @@ -518,14 +518,14 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2125 // The option MStateDependence will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2126 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2127 octave_value vmvpat = vodeopt.contents ("MvPattern");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2128 - if (!vmvpat.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2129 + if (!vmvpat.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2130 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2131 "Option \"MvPattern\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2132
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2133 // The option MassSingular will be ignored by this solver, the
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2134 // core Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2135 octave_value vmsing = vodeopt.contents ("MassSingular");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2136 - if (!vmsing.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2137 + if (!vmsing.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2138 if (vmsing.string_value ().compare ("maybe") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2139 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2140 "Option \"MassSingular\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2141 @@ -533,21 +533,21 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2142 // The option InitialSlope will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2143 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2144 octave_value vinitslope = vodeopt.contents ("InitialSlope");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2145 - if (!vinitslope.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2146 + if (!vinitslope.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2147 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2148 "Option \"InitialSlope\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2149
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2150 // The option MaxOrder will be ignored by this solver, the core
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2151 // Fortran solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2152 octave_value vmaxder = vodeopt.contents ("MaxOrder");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2153 - if (!vmaxder.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2154 + if (!vmaxder.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2155 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2156 "Option \"MaxOrder\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2157
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2158 // The option BDF will be ignored by this solver, the core Fortran
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2159 // solver doesn't support this option
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2160 octave_value vbdf = vodeopt.contents ("BDF");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2161 - if (!vbdf.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2162 + if (!vbdf.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2163 if (vbdf.string_value ().compare ("off") != 0)
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2164 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2165 "Option \"BDF\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2166 @@ -555,12 +555,12 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2167 // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2168 // CAN HANDLE THESE OPTIONS
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2169 octave_value vntol = vodeopt.contents ("NewtonTol");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2170 - if (!vntol.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2171 + if (!vntol.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2172 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2173 "Option \"NewtonTol\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2174 octave_value vmaxnewton =
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2175 vodeopt.contents ("MaxNewtonIterations");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2176 - if (!vmaxnewton.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2177 + if (!vmaxnewton.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2178 warning_with_id ("OdePkg:InvalidOption",
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2179 "Option \"MaxNewtonIterations\" will be ignored by this solver");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2180
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2181 @@ -608,9 +608,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2182 octave_value vtim = args(1).vector_value ()(0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2183 octave_value vsol = args(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2184 odepkg_auxiliary_solstore (vtim, vsol, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2185 - if (!vseulexpltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2186 + if (!vseulexpltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2187 (vseulexpltfun, vseulexoutsel, args(1), args(2), vseulexextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2188 - if (!vseulexevefun.is_empty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2189 + if (!vseulexevefun.isempty ())
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2190 odepkg_auxiliary_evaleventfun (vseulexevefun, vtim, args(2), vseulexextarg, 0);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2191
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2192 // We are calling the core solver and solve the set of ODEs or DAEs
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2193 @@ -651,9 +651,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2194 octave_value vted = octave_value (XEND);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2195 octave_value vfin = octave_value (vlastline);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2196
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2197 - if (!vseulexpltfun.is_empty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2198 + if (!vseulexpltfun.isempty ()) odepkg_auxiliary_evalplotfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2199 (vseulexpltfun, vseulexoutsel, vted, vfin, vseulexextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2200 - if (!vseulexevefun.is_empty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2201 + if (!vseulexevefun.isempty ()) odepkg_auxiliary_evaleventfun
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2202 (vseulexevefun, vted, vfin, vseulexextarg, 2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2203
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2204 // Get the stats information as an octave_scalar_map if the option 'Stats'
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2205 @@ -678,9 +678,9 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2206 vretmap.assign ("x", vtres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2207 vretmap.assign ("y", vyres);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2208 vretmap.assign ("solver", "odesx");
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2209 - if (!vstatinfo.is_empty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2210 + if (!vstatinfo.isempty ()) // Event implementation
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2211 vretmap.assign ("stats", vstatinfo);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2212 - if (!vseulexevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2213 + if (!vseulexevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2214 vretmap.assign ("ie", vseulexevesol(0).cell_value ()(1));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2215 vretmap.assign ("xe", vseulexevesol(0).cell_value ()(2));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2216 vretmap.assign ("ye", vseulexevesol(0).cell_value ()(3));
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2217 @@ -698,7 +698,7 @@
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2218 vretval(2) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2219 vretval(3) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2220 vretval(4) = vempty;
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2221 - if (!vseulexevefun.is_empty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2222 + if (!vseulexevefun.isempty ()) {
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2223 vretval(2) = vseulexevesol(0).cell_value ()(2);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2224 vretval(3) = vseulexevesol(0).cell_value ()(3);
79edc3a96749 of-ode: patch for depreciated functions (Bug #55325)
John Donoghue
parents:
diff changeset
2225 vretval(4) = vseulexevesol(0).cell_value ()(1);