Mercurial > hg > octave-nkf
diff 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 |
line wrap: on
line diff
--- a/liboctave/DASPK-opts.in +++ b/liboctave/DASPK-opts.in @@ -4,6 +4,11 @@ OPTION NAME = "absolute tolerance" + DOC_ITEM +Absolute tolerance. May be either vector or scalar. If a vector, it +must match the dimension of the state vector, and the relative +tolerance must also be a vector of the same length. + END_DOC_ITEM TYPE = "Array<double>" SET_ARG_TYPE = "const $TYPE&" INIT_BODY @@ -25,6 +30,17 @@ OPTION NAME = "relative tolerance" + DOC_ITEM +Relative tolerance. May be either vector or scalar. If a vector, it +must match the dimension of the state vector, and the absolute +tolerance must also be a vector of the same length. + +The local error test applied at each integration step is + +@example + abs (local error in x(i)) <= rtol(i) * abs (Y(i)) + atol(i) +@end example + END_DOC_ITEM TYPE = "Array<double>" SET_ARG_TYPE = "const $TYPE&" INIT_BODY @@ -46,6 +62,108 @@ OPTION NAME = "compute consistent initial condition" + DOC_ITEM +Denoting the differential variables in the state vector by @samp{Y_d} +and the algebraic variables by @samp{Y_a}, @code{ddaspk} can solve +one of two initialization problems: + +@enumerate +@item Given Y_d, calculate Y_a and Y'_d +@item Given Y', calculate Y. +@end enumerate + +In either case, initial values for the given components are input, and +initial guesses for the unknown components must also be provided as +input. Set this option to 1 to solve the first problem, or 2 to solve +the second (the default default is 0, so you must provide a set of +initial conditions that are consistent). + +If this option is set to a nonzero value, you must also set the +@code{\"algebraic variables\"} option to declare which variables in the +problem are algebraic. + END_DOC_ITEM + TYPE = "int" + INIT_VALUE = "0" + SET_EXPR = "val" +END_OPTION + +OPTION + NAME = "use initial condition heuristics" + DOC_ITEM +Set to a nonzero value to use the initial condition heuristics options +described below. + END_DOC_ITEM + TYPE = "int" + INIT_VALUE = "0" + SET_EXPR = "val" +END_OPTION + +OPTION + NAME = "initial condition heuristics" + DOC_ITEM +A vector of the following parameters that can be used to control the +initial condition calculation. + +@table @code +@item MXNIT +Maximum number of Newton iterations (default is 5). +@item MXNJ +Maximum number of Jacobian evaluations (default is 6). +@item MXNH +Maximum number of values of the artificial stepsize parameter to be +tried if the @code{\"compute consistent initial condition\"} option has +been set to 1 (default is 5). + +Note that the maximum number of Newton iterations allowed in all is +@code{MXNIT*MXNJ*MXNH} if the @code{\"compute consistent initial +condition\"} option has been set to 1 and @code{MXNIT*MXNJ} if it is +set to 2. +@item LSOFF +Set to a nonzero value to disable the linesearch algorithm (default is +0). +@item STPTOL +Minimum scaled step in linesearch algorithm (default is eps^(2/3)). +@item EPINIT +Swing factor in the Newton iteration convergence test. The test is +applied to the residual vector, premultiplied by the approximate +Jacobian. For convergence, the weighted RMS norm of this vector +(scaled by the error weights) must be less than @code{EPINIT*EPCON}, +where @code{EPCON} = 0.33 is the analogous test constant used in the +time steps. The default is @code{EPINIT} = 0.01. +@end table + END_DOC_ITEM + TYPE = "Array<double>" + SET_ARG_TYPE = "const $TYPE&" + INIT_BODY + $OPTVAR.resize (6, 0.0); + $OPTVAR(0) = 5.0; + $OPTVAR(1) = 6.0; + $OPTVAR(2) = 5.0; + $OPTVAR(3) = 0.0; + $OPTVAR(4) = ::pow (DBL_EPSILON, 2.0/3.0); + $OPTVAR(5) = 0.01; + END_INIT_BODY + SET_EXPR = "val" +END_OPTION + +OPTION + NAME = "print initial condition info" + DOC_ITEM +Set this option to a nonzero value to display detailed information +about the initial condition calculation (default is 0). + END_DOC_ITEM + TYPE = "int" + INIT_VALUE = "0" + SET_EXPR = "val" +END_OPTION + +OPTION + NAME = "exclude algebraic variables from error test" + DOC_ITEM +Set to a nonzero value to exclude algebraic variables from the error +test. You must also set the @code{\"algebraic variables\"} option to +declare which variables in the problem are algebraic (default is 0). + END_DOC_ITEM TYPE = "int" INIT_VALUE = "0" SET_EXPR = "val" @@ -53,6 +171,16 @@ OPTION NAME = "algebraic variables" + DOC_ITEM +A vector of the same length as the state vector. A nonzero element +indicates that the corresponding element of the state vector is an +algebraic variable (i.e., its derivative does not appear explicitly +in the equation set. + +This option is required by the +@code{compute consistent initial condition\"} and +@code{\"exclude algebraic variables from error test\"} options. + END_DOC_ITEM TYPE = "Array<int>" SET_ARG_TYPE = const $TYPE& INIT_BODY @@ -74,6 +202,17 @@ OPTION NAME = "enforce inequality constraints" + DOC_ITEM +Set to one of the following values to enforce the inequality +constraints specified by the @code{\"inequality constraint types\"} +option (default is 0). + +@enumerate +@item To have constraint checking only in the initial condition calculation. +@item To enforce constraint checking during the integration. +@item To enforce both options 1 and 2. +@end enumerate + END_DOC_ITEM TYPE = "int" INIT_VALUE = "0" SET_EXPR = "val" @@ -81,6 +220,28 @@ OPTION NAME = "inequality constraint types" + DOC_ITEM +A vector of the same length as the state specifying the type of +inequality constraint. Each element of the vector corresponds to an +element of the state and should be assigned one of the following +codes + +@table @asis +@item -2 +Less than zero. +@item -1 +Less than or equal to zero. +@item 0 +Not constrained. +@item 1 +Greater than or equal to zero. +@item 2 +Greater than zero. +@end table + +This option only has an effect if the +@code{\"enforce inequality constraints\"} option is nonzero. + END_DOC_ITEM TYPE = "Array<int>" SET_ARG_TYPE = const $TYPE& INIT_BODY @@ -101,37 +262,14 @@ END_OPTION OPTION - NAME = "exclude algebraic variables from error test" - TYPE = "int" - INIT_VALUE = "0" - SET_EXPR = "val" -END_OPTION - -OPTION - NAME = "use initial condition heuristics" - TYPE = "int" - INIT_VALUE = "0" - SET_EXPR = "val" -END_OPTION - -OPTION - NAME = "initial condition heuristics" - TYPE = "Array<double>" - SET_ARG_TYPE = "const $TYPE&" - INIT_BODY - $OPTVAR.resize (6, 0.0); - $OPTVAR(0) = 5.0; - $OPTVAR(1) = 6.0; - $OPTVAR(2) = 5.0; - $OPTVAR(3) = 0.0; - $OPTVAR(4) = ::pow (DBL_EPSILON, 2.0/3.0); - $OPTVAR(5) = 0.01; - END_INIT_BODY - SET_EXPR = "val" -END_OPTION - -OPTION NAME = "initial step size" + DOC_ITEM +Differential-algebraic problems may occaisionally suffer from severe +scaling difficulties on the first step. If you know a great deal +about the scaling of your problem, you can help to alleviate this +problem by specifying an initial stepsize (default is computed +automatically). + END_DOC_ITEM TYPE = "double" INIT_VALUE = "-1.0" SET_EXPR = "(val >= 0.0) ? val : -1.0" @@ -139,21 +277,22 @@ OPTION NAME = "maximum order" + DOC_ITEM +Restrict the maximum order of the solution method. This option must +be between 1 and 5, inclusive (default is 5). + END_DOC_ITEM TYPE = "int" - INIT_VALUE = "-1" + INIT_VALUE = "5" SET_EXPR = "val" END_OPTION OPTION NAME = "maximum step size" + DOC_ITEM +Setting the maximum stepsize will avoid passing over very large +regions (default is not specified). + END_DOC_ITEM TYPE = "double" INIT_VALUE = "-1.0" SET_EXPR = "(val >= 0.0) ? val : -1.0" END_OPTION - -OPTION - NAME = "print initial condition info" - TYPE = "int" - INIT_VALUE = "0" - SET_EXPR = "val" -END_OPTION