Mercurial > hg > octave-nkf
annotate liboctave/DASPK-opts.in @ 10731:f5dbac015606
Add [FILE] to octave usage string (bug #30258).
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 24 Jun 2010 20:08:14 -0700 |
parents | 12884915a8e4 |
children | 89f4d7e294cc |
rev | line source |
---|---|
9245 | 1 # Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 John W. Eaton |
7017 | 2 # |
3 # This file is part of Octave. | |
4 # | |
5 # Octave is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License as published by the | |
7 # Free Software Foundation; either version 3 of the License, or (at | |
8 # your option) any later version. | |
9 # | |
10 # Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 # for more details. | |
14 # | |
15 # You should have received a copy of the GNU General Public License | |
16 # along with Octave; see the file COPYING. If not, see | |
17 # <http://www.gnu.org/licenses/>. | |
18 | |
3998 | 19 CLASS = "DASPK" |
20 | |
4044 | 21 INCLUDE = "DAE.h" |
22 | |
3998 | 23 OPTION |
24 NAME = "absolute tolerance" | |
4050 | 25 DOC_ITEM |
26 Absolute tolerance. May be either vector or scalar. If a vector, it | |
27 must match the dimension of the state vector, and the relative | |
28 tolerance must also be a vector of the same length. | |
29 END_DOC_ITEM | |
3998 | 30 TYPE = "Array<double>" |
31 SET_ARG_TYPE = "const $TYPE&" | |
32 INIT_BODY | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
33 $OPTVAR.resize (1, 1); |
3998 | 34 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
35 END_INIT_BODY | |
36 SET_CODE | |
37 void set_$OPT (double val) | |
38 { | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
39 $OPTVAR.resize (1, 1); |
3998 | 40 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049 | 41 reset = true; |
3998 | 42 } |
43 | |
44 void set_$OPT (const $TYPE& val) | |
4049 | 45 { $OPTVAR = val; reset = true; } |
3998 | 46 END_SET_CODE |
47 END_OPTION | |
48 | |
49 OPTION | |
50 NAME = "relative tolerance" | |
4050 | 51 DOC_ITEM |
52 Relative tolerance. May be either vector or scalar. If a vector, it | |
53 must match the dimension of the state vector, and the absolute | |
54 tolerance must also be a vector of the same length. | |
55 | |
56 The local error test applied at each integration step is | |
57 | |
58 @example | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7096
diff
changeset
|
59 @group |
5016 | 60 abs (local error in x(i)) |
61 <= rtol(i) * abs (Y(i)) + atol(i) | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7096
diff
changeset
|
62 @end group |
4050 | 63 @end example |
64 END_DOC_ITEM | |
3998 | 65 TYPE = "Array<double>" |
66 SET_ARG_TYPE = "const $TYPE&" | |
67 INIT_BODY | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
68 $OPTVAR.resize (1, 1); |
3998 | 69 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
70 END_INIT_BODY | |
71 SET_CODE | |
72 void set_$OPT (double val) | |
73 { | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
74 $OPTVAR.resize (1, 1); |
3998 | 75 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049 | 76 reset = true; |
3998 | 77 } |
78 | |
79 void set_$OPT (const $TYPE& val) | |
4049 | 80 { $OPTVAR = val; reset = true; } |
3998 | 81 END_SET_CODE |
82 END_OPTION | |
83 | |
84 OPTION | |
4044 | 85 NAME = "compute consistent initial condition" |
4050 | 86 DOC_ITEM |
87 Denoting the differential variables in the state vector by @samp{Y_d} | |
88 and the algebraic variables by @samp{Y_a}, @code{ddaspk} can solve | |
89 one of two initialization problems: | |
90 | |
91 @enumerate | |
92 @item Given Y_d, calculate Y_a and Y'_d | |
93 @item Given Y', calculate Y. | |
94 @end enumerate | |
95 | |
96 In either case, initial values for the given components are input, and | |
97 initial guesses for the unknown components must also be provided as | |
98 input. Set this option to 1 to solve the first problem, or 2 to solve | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7096
diff
changeset
|
99 the second (the default is 0, so you must provide a set of |
4050 | 100 initial conditions that are consistent). |
101 | |
102 If this option is set to a nonzero value, you must also set the | |
103 @code{\"algebraic variables\"} option to declare which variables in the | |
104 problem are algebraic. | |
105 END_DOC_ITEM | |
5275 | 106 TYPE = "octave_idx_type" |
4050 | 107 INIT_VALUE = "0" |
108 SET_EXPR = "val" | |
109 END_OPTION | |
110 | |
111 OPTION | |
112 NAME = "use initial condition heuristics" | |
113 DOC_ITEM | |
114 Set to a nonzero value to use the initial condition heuristics options | |
115 described below. | |
116 END_DOC_ITEM | |
5275 | 117 TYPE = "octave_idx_type" |
4050 | 118 INIT_VALUE = "0" |
119 SET_EXPR = "val" | |
120 END_OPTION | |
121 | |
122 OPTION | |
123 NAME = "initial condition heuristics" | |
124 DOC_ITEM | |
125 A vector of the following parameters that can be used to control the | |
126 initial condition calculation. | |
127 | |
128 @table @code | |
129 @item MXNIT | |
130 Maximum number of Newton iterations (default is 5). | |
131 @item MXNJ | |
132 Maximum number of Jacobian evaluations (default is 6). | |
133 @item MXNH | |
134 Maximum number of values of the artificial stepsize parameter to be | |
135 tried if the @code{\"compute consistent initial condition\"} option has | |
136 been set to 1 (default is 5). | |
137 | |
7096 | 138 Note that the maximum total number of Newton iterations allowed is |
4050 | 139 @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial |
140 condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is | |
141 set to 2. | |
142 @item LSOFF | |
143 Set to a nonzero value to disable the linesearch algorithm (default is | |
144 0). | |
145 @item STPTOL | |
146 Minimum scaled step in linesearch algorithm (default is eps^(2/3)). | |
147 @item EPINIT | |
148 Swing factor in the Newton iteration convergence test. The test is | |
149 applied to the residual vector, premultiplied by the approximate | |
150 Jacobian. For convergence, the weighted RMS norm of this vector | |
151 (scaled by the error weights) must be less than @code{EPINIT*EPCON}, | |
152 where @code{EPCON} = 0.33 is the analogous test constant used in the | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7096
diff
changeset
|
153 time steps. The default is @code{EPINIT} = 0.01. |
4050 | 154 @end table |
155 END_DOC_ITEM | |
156 TYPE = "Array<double>" | |
157 SET_ARG_TYPE = "const $TYPE&" | |
158 INIT_BODY | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
159 $OPTVAR.resize (6, 1); |
4050 | 160 $OPTVAR(0) = 5.0; |
161 $OPTVAR(1) = 6.0; | |
162 $OPTVAR(2) = 5.0; | |
163 $OPTVAR(3) = 0.0; | |
164 $OPTVAR(4) = ::pow (DBL_EPSILON, 2.0/3.0); | |
165 $OPTVAR(5) = 0.01; | |
166 END_INIT_BODY | |
167 SET_EXPR = "val" | |
168 END_OPTION | |
169 | |
170 OPTION | |
171 NAME = "print initial condition info" | |
172 DOC_ITEM | |
173 Set this option to a nonzero value to display detailed information | |
174 about the initial condition calculation (default is 0). | |
175 END_DOC_ITEM | |
5275 | 176 TYPE = "octave_idx_type" |
4050 | 177 INIT_VALUE = "0" |
178 SET_EXPR = "val" | |
179 END_OPTION | |
180 | |
181 OPTION | |
182 NAME = "exclude algebraic variables from error test" | |
183 DOC_ITEM | |
184 Set to a nonzero value to exclude algebraic variables from the error | |
185 test. You must also set the @code{\"algebraic variables\"} option to | |
186 declare which variables in the problem are algebraic (default is 0). | |
187 END_DOC_ITEM | |
5275 | 188 TYPE = "octave_idx_type" |
4044 | 189 INIT_VALUE = "0" |
190 SET_EXPR = "val" | |
191 END_OPTION | |
192 | |
193 OPTION | |
4047 | 194 NAME = "algebraic variables" |
4050 | 195 DOC_ITEM |
196 A vector of the same length as the state vector. A nonzero element | |
197 indicates that the corresponding element of the state vector is an | |
198 algebraic variable (i.e., its derivative does not appear explicitly | |
199 in the equation set. | |
200 | |
201 This option is required by the | |
202 @code{compute consistent initial condition\"} and | |
203 @code{\"exclude algebraic variables from error test\"} options. | |
204 END_DOC_ITEM | |
5275 | 205 TYPE = "Array<octave_idx_type>" |
4047 | 206 SET_ARG_TYPE = const $TYPE& |
207 INIT_BODY | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
208 $OPTVAR.resize (1, 1); |
4047 | 209 $OPTVAR(0) = 0; |
210 END_INIT_BODY | |
211 SET_CODE | |
212 void set_$OPT (int val) | |
213 { | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
214 $OPTVAR.resize (1, 1); |
4047 | 215 $OPTVAR(0) = val; |
4049 | 216 reset = true; |
4047 | 217 } |
218 | |
219 void set_$OPT (const $TYPE& val) | |
4049 | 220 { $OPTVAR = val; reset = true; } |
4047 | 221 END_SET_CODE |
222 END_OPTION | |
223 | |
224 OPTION | |
4044 | 225 NAME = "enforce inequality constraints" |
4050 | 226 DOC_ITEM |
227 Set to one of the following values to enforce the inequality | |
228 constraints specified by the @code{\"inequality constraint types\"} | |
229 option (default is 0). | |
230 | |
231 @enumerate | |
232 @item To have constraint checking only in the initial condition calculation. | |
233 @item To enforce constraint checking during the integration. | |
234 @item To enforce both options 1 and 2. | |
235 @end enumerate | |
236 END_DOC_ITEM | |
5275 | 237 TYPE = "octave_idx_type" |
4044 | 238 INIT_VALUE = "0" |
239 SET_EXPR = "val" | |
240 END_OPTION | |
241 | |
242 OPTION | |
243 NAME = "inequality constraint types" | |
4050 | 244 DOC_ITEM |
245 A vector of the same length as the state specifying the type of | |
246 inequality constraint. Each element of the vector corresponds to an | |
247 element of the state and should be assigned one of the following | |
248 codes | |
249 | |
250 @table @asis | |
251 @item -2 | |
252 Less than zero. | |
253 @item -1 | |
254 Less than or equal to zero. | |
255 @item 0 | |
256 Not constrained. | |
257 @item 1 | |
258 Greater than or equal to zero. | |
259 @item 2 | |
260 Greater than zero. | |
261 @end table | |
262 | |
263 This option only has an effect if the | |
264 @code{\"enforce inequality constraints\"} option is nonzero. | |
265 END_DOC_ITEM | |
5275 | 266 TYPE = "Array<octave_idx_type>" |
4044 | 267 SET_ARG_TYPE = const $TYPE& |
268 INIT_BODY | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
269 $OPTVAR.resize (1, 1); |
4044 | 270 $OPTVAR(0) = 0; |
271 END_INIT_BODY | |
272 SET_CODE | |
5275 | 273 void set_$OPT (octave_idx_type val) |
4044 | 274 { |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
275 $OPTVAR.resize (1, 1); |
4047 | 276 $OPTVAR(0) = val; |
4049 | 277 reset = true; |
4044 | 278 } |
279 | |
280 void set_$OPT (const $TYPE& val) | |
4049 | 281 { $OPTVAR = val; reset = true; } |
4044 | 282 END_SET_CODE |
283 END_OPTION | |
284 | |
285 OPTION | |
3998 | 286 NAME = "initial step size" |
4050 | 287 DOC_ITEM |
7001 | 288 Differential-algebraic problems may occasionally suffer from severe |
4050 | 289 scaling difficulties on the first step. If you know a great deal |
290 about the scaling of your problem, you can help to alleviate this | |
291 problem by specifying an initial stepsize (default is computed | |
292 automatically). | |
293 END_DOC_ITEM | |
3998 | 294 TYPE = "double" |
295 INIT_VALUE = "-1.0" | |
296 SET_EXPR = "(val >= 0.0) ? val : -1.0" | |
297 END_OPTION | |
298 | |
299 OPTION | |
4044 | 300 NAME = "maximum order" |
4050 | 301 DOC_ITEM |
302 Restrict the maximum order of the solution method. This option must | |
303 be between 1 and 5, inclusive (default is 5). | |
304 END_DOC_ITEM | |
5275 | 305 TYPE = "octave_idx_type" |
4050 | 306 INIT_VALUE = "5" |
4044 | 307 SET_EXPR = "val" |
308 END_OPTION | |
309 | |
310 OPTION | |
3998 | 311 NAME = "maximum step size" |
4050 | 312 DOC_ITEM |
313 Setting the maximum stepsize will avoid passing over very large | |
314 regions (default is not specified). | |
315 END_DOC_ITEM | |
3998 | 316 TYPE = "double" |
317 INIT_VALUE = "-1.0" | |
318 SET_EXPR = "(val >= 0.0) ? val : -1.0" | |
319 END_OPTION |