comparison liboctave/DASPK-opts.in @ 4050:6481f41a79f3

[project @ 2002-08-17 02:18:18 by jwe]
author jwe
date Sat, 17 Aug 2002 02:18:18 +0000
parents a35a3c5d4740
children 820323598f4f
comparison
equal deleted inserted replaced
4049:a35a3c5d4740 4050:6481f41a79f3
2 2
3 INCLUDE = "DAE.h" 3 INCLUDE = "DAE.h"
4 4
5 OPTION 5 OPTION
6 NAME = "absolute tolerance" 6 NAME = "absolute tolerance"
7 DOC_ITEM
8 Absolute tolerance. May be either vector or scalar. If a vector, it
9 must match the dimension of the state vector, and the relative
10 tolerance must also be a vector of the same length.
11 END_DOC_ITEM
7 TYPE = "Array<double>" 12 TYPE = "Array<double>"
8 SET_ARG_TYPE = "const $TYPE&" 13 SET_ARG_TYPE = "const $TYPE&"
9 INIT_BODY 14 INIT_BODY
10 $OPTVAR.resize (1); 15 $OPTVAR.resize (1);
11 $OPTVAR(0) = ::sqrt (DBL_EPSILON); 16 $OPTVAR(0) = ::sqrt (DBL_EPSILON);
23 END_SET_CODE 28 END_SET_CODE
24 END_OPTION 29 END_OPTION
25 30
26 OPTION 31 OPTION
27 NAME = "relative tolerance" 32 NAME = "relative tolerance"
33 DOC_ITEM
34 Relative tolerance. May be either vector or scalar. If a vector, it
35 must match the dimension of the state vector, and the absolute
36 tolerance must also be a vector of the same length.
37
38 The local error test applied at each integration step is
39
40 @example
41 abs (local error in x(i)) <= rtol(i) * abs (Y(i)) + atol(i)
42 @end example
43 END_DOC_ITEM
28 TYPE = "Array<double>" 44 TYPE = "Array<double>"
29 SET_ARG_TYPE = "const $TYPE&" 45 SET_ARG_TYPE = "const $TYPE&"
30 INIT_BODY 46 INIT_BODY
31 $OPTVAR.resize (1); 47 $OPTVAR.resize (1);
32 $OPTVAR(0) = ::sqrt (DBL_EPSILON); 48 $OPTVAR(0) = ::sqrt (DBL_EPSILON);
44 END_SET_CODE 60 END_SET_CODE
45 END_OPTION 61 END_OPTION
46 62
47 OPTION 63 OPTION
48 NAME = "compute consistent initial condition" 64 NAME = "compute consistent initial condition"
49 TYPE = "int" 65 DOC_ITEM
50 INIT_VALUE = "0" 66 Denoting the differential variables in the state vector by @samp{Y_d}
51 SET_EXPR = "val" 67 and the algebraic variables by @samp{Y_a}, @code{ddaspk} can solve
52 END_OPTION 68 one of two initialization problems:
53 69
54 OPTION 70 @enumerate
55 NAME = "algebraic variables" 71 @item Given Y_d, calculate Y_a and Y'_d
56 TYPE = "Array<int>" 72 @item Given Y', calculate Y.
57 SET_ARG_TYPE = const $TYPE& 73 @end enumerate
58 INIT_BODY 74
59 $OPTVAR.resize (1); 75 In either case, initial values for the given components are input, and
60 $OPTVAR(0) = 0; 76 initial guesses for the unknown components must also be provided as
61 END_INIT_BODY 77 input. Set this option to 1 to solve the first problem, or 2 to solve
62 SET_CODE 78 the second (the default default is 0, so you must provide a set of
63 void set_$OPT (int val) 79 initial conditions that are consistent).
64 { 80
65 $OPTVAR.resize (1); 81 If this option is set to a nonzero value, you must also set the
66 $OPTVAR(0) = val; 82 @code{\"algebraic variables\"} option to declare which variables in the
67 reset = true; 83 problem are algebraic.
68 } 84 END_DOC_ITEM
69
70 void set_$OPT (const $TYPE& val)
71 { $OPTVAR = val; reset = true; }
72 END_SET_CODE
73 END_OPTION
74
75 OPTION
76 NAME = "enforce inequality constraints"
77 TYPE = "int"
78 INIT_VALUE = "0"
79 SET_EXPR = "val"
80 END_OPTION
81
82 OPTION
83 NAME = "inequality constraint types"
84 TYPE = "Array<int>"
85 SET_ARG_TYPE = const $TYPE&
86 INIT_BODY
87 $OPTVAR.resize (1);
88 $OPTVAR(0) = 0;
89 END_INIT_BODY
90 SET_CODE
91 void set_$OPT (int val)
92 {
93 $OPTVAR.resize (1);
94 $OPTVAR(0) = val;
95 reset = true;
96 }
97
98 void set_$OPT (const $TYPE& val)
99 { $OPTVAR = val; reset = true; }
100 END_SET_CODE
101 END_OPTION
102
103 OPTION
104 NAME = "exclude algebraic variables from error test"
105 TYPE = "int" 85 TYPE = "int"
106 INIT_VALUE = "0" 86 INIT_VALUE = "0"
107 SET_EXPR = "val" 87 SET_EXPR = "val"
108 END_OPTION 88 END_OPTION
109 89
110 OPTION 90 OPTION
111 NAME = "use initial condition heuristics" 91 NAME = "use initial condition heuristics"
92 DOC_ITEM
93 Set to a nonzero value to use the initial condition heuristics options
94 described below.
95 END_DOC_ITEM
112 TYPE = "int" 96 TYPE = "int"
113 INIT_VALUE = "0" 97 INIT_VALUE = "0"
114 SET_EXPR = "val" 98 SET_EXPR = "val"
115 END_OPTION 99 END_OPTION
116 100
117 OPTION 101 OPTION
118 NAME = "initial condition heuristics" 102 NAME = "initial condition heuristics"
103 DOC_ITEM
104 A vector of the following parameters that can be used to control the
105 initial condition calculation.
106
107 @table @code
108 @item MXNIT
109 Maximum number of Newton iterations (default is 5).
110 @item MXNJ
111 Maximum number of Jacobian evaluations (default is 6).
112 @item MXNH
113 Maximum number of values of the artificial stepsize parameter to be
114 tried if the @code{\"compute consistent initial condition\"} option has
115 been set to 1 (default is 5).
116
117 Note that the maximum number of Newton iterations allowed in all is
118 @code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial
119 condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is
120 set to 2.
121 @item LSOFF
122 Set to a nonzero value to disable the linesearch algorithm (default is
123 0).
124 @item STPTOL
125 Minimum scaled step in linesearch algorithm (default is eps^(2/3)).
126 @item EPINIT
127 Swing factor in the Newton iteration convergence test. The test is
128 applied to the residual vector, premultiplied by the approximate
129 Jacobian. For convergence, the weighted RMS norm of this vector
130 (scaled by the error weights) must be less than @code{EPINIT*EPCON},
131 where @code{EPCON} = 0.33 is the analogous test constant used in the
132 time steps. The default is @code{EPINIT} = 0.01.
133 @end table
134 END_DOC_ITEM
119 TYPE = "Array<double>" 135 TYPE = "Array<double>"
120 SET_ARG_TYPE = "const $TYPE&" 136 SET_ARG_TYPE = "const $TYPE&"
121 INIT_BODY 137 INIT_BODY
122 $OPTVAR.resize (6, 0.0); 138 $OPTVAR.resize (6, 0.0);
123 $OPTVAR(0) = 5.0; 139 $OPTVAR(0) = 5.0;
129 END_INIT_BODY 145 END_INIT_BODY
130 SET_EXPR = "val" 146 SET_EXPR = "val"
131 END_OPTION 147 END_OPTION
132 148
133 OPTION 149 OPTION
150 NAME = "print initial condition info"
151 DOC_ITEM
152 Set this option to a nonzero value to display detailed information
153 about the initial condition calculation (default is 0).
154 END_DOC_ITEM
155 TYPE = "int"
156 INIT_VALUE = "0"
157 SET_EXPR = "val"
158 END_OPTION
159
160 OPTION
161 NAME = "exclude algebraic variables from error test"
162 DOC_ITEM
163 Set to a nonzero value to exclude algebraic variables from the error
164 test. You must also set the @code{\"algebraic variables\"} option to
165 declare which variables in the problem are algebraic (default is 0).
166 END_DOC_ITEM
167 TYPE = "int"
168 INIT_VALUE = "0"
169 SET_EXPR = "val"
170 END_OPTION
171
172 OPTION
173 NAME = "algebraic variables"
174 DOC_ITEM
175 A vector of the same length as the state vector. A nonzero element
176 indicates that the corresponding element of the state vector is an
177 algebraic variable (i.e., its derivative does not appear explicitly
178 in the equation set.
179
180 This option is required by the
181 @code{compute consistent initial condition\"} and
182 @code{\"exclude algebraic variables from error test\"} options.
183 END_DOC_ITEM
184 TYPE = "Array<int>"
185 SET_ARG_TYPE = const $TYPE&
186 INIT_BODY
187 $OPTVAR.resize (1);
188 $OPTVAR(0) = 0;
189 END_INIT_BODY
190 SET_CODE
191 void set_$OPT (int val)
192 {
193 $OPTVAR.resize (1);
194 $OPTVAR(0) = val;
195 reset = true;
196 }
197
198 void set_$OPT (const $TYPE& val)
199 { $OPTVAR = val; reset = true; }
200 END_SET_CODE
201 END_OPTION
202
203 OPTION
204 NAME = "enforce inequality constraints"
205 DOC_ITEM
206 Set to one of the following values to enforce the inequality
207 constraints specified by the @code{\"inequality constraint types\"}
208 option (default is 0).
209
210 @enumerate
211 @item To have constraint checking only in the initial condition calculation.
212 @item To enforce constraint checking during the integration.
213 @item To enforce both options 1 and 2.
214 @end enumerate
215 END_DOC_ITEM
216 TYPE = "int"
217 INIT_VALUE = "0"
218 SET_EXPR = "val"
219 END_OPTION
220
221 OPTION
222 NAME = "inequality constraint types"
223 DOC_ITEM
224 A vector of the same length as the state specifying the type of
225 inequality constraint. Each element of the vector corresponds to an
226 element of the state and should be assigned one of the following
227 codes
228
229 @table @asis
230 @item -2
231 Less than zero.
232 @item -1
233 Less than or equal to zero.
234 @item 0
235 Not constrained.
236 @item 1
237 Greater than or equal to zero.
238 @item 2
239 Greater than zero.
240 @end table
241
242 This option only has an effect if the
243 @code{\"enforce inequality constraints\"} option is nonzero.
244 END_DOC_ITEM
245 TYPE = "Array<int>"
246 SET_ARG_TYPE = const $TYPE&
247 INIT_BODY
248 $OPTVAR.resize (1);
249 $OPTVAR(0) = 0;
250 END_INIT_BODY
251 SET_CODE
252 void set_$OPT (int val)
253 {
254 $OPTVAR.resize (1);
255 $OPTVAR(0) = val;
256 reset = true;
257 }
258
259 void set_$OPT (const $TYPE& val)
260 { $OPTVAR = val; reset = true; }
261 END_SET_CODE
262 END_OPTION
263
264 OPTION
134 NAME = "initial step size" 265 NAME = "initial step size"
266 DOC_ITEM
267 Differential-algebraic problems may occaisionally suffer from severe
268 scaling difficulties on the first step. If you know a great deal
269 about the scaling of your problem, you can help to alleviate this
270 problem by specifying an initial stepsize (default is computed
271 automatically).
272 END_DOC_ITEM
135 TYPE = "double" 273 TYPE = "double"
136 INIT_VALUE = "-1.0" 274 INIT_VALUE = "-1.0"
137 SET_EXPR = "(val >= 0.0) ? val : -1.0" 275 SET_EXPR = "(val >= 0.0) ? val : -1.0"
138 END_OPTION 276 END_OPTION
139 277
140 OPTION 278 OPTION
141 NAME = "maximum order" 279 NAME = "maximum order"
142 TYPE = "int" 280 DOC_ITEM
143 INIT_VALUE = "-1" 281 Restrict the maximum order of the solution method. This option must
282 be between 1 and 5, inclusive (default is 5).
283 END_DOC_ITEM
284 TYPE = "int"
285 INIT_VALUE = "5"
144 SET_EXPR = "val" 286 SET_EXPR = "val"
145 END_OPTION 287 END_OPTION
146 288
147 OPTION 289 OPTION
148 NAME = "maximum step size" 290 NAME = "maximum step size"
291 DOC_ITEM
292 Setting the maximum stepsize will avoid passing over very large
293 regions (default is not specified).
294 END_DOC_ITEM
149 TYPE = "double" 295 TYPE = "double"
150 INIT_VALUE = "-1.0" 296 INIT_VALUE = "-1.0"
151 SET_EXPR = "(val >= 0.0) ? val : -1.0" 297 SET_EXPR = "(val >= 0.0) ? val : -1.0"
152 END_OPTION 298 END_OPTION
153
154 OPTION
155 NAME = "print initial condition info"
156 TYPE = "int"
157 INIT_VALUE = "0"
158 SET_EXPR = "val"
159 END_OPTION