3998
|
1 CLASS = "DASSL" |
|
2 |
4044
|
3 INCLUDE = "DAE.h" |
|
4 |
3998
|
5 OPTION |
|
6 NAME = "absolute tolerance" |
4050
|
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 |
3998
|
12 TYPE = "Array<double>" |
|
13 SET_ARG_TYPE = "const $TYPE&" |
|
14 INIT_BODY |
|
15 $OPTVAR.resize (1); |
|
16 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
|
17 END_INIT_BODY |
|
18 SET_CODE |
|
19 void set_$OPT (double val) |
|
20 { |
|
21 $OPTVAR.resize (1); |
|
22 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049
|
23 reset = true; |
3998
|
24 } |
|
25 |
|
26 void set_$OPT (const $TYPE& val) |
4049
|
27 { $OPTVAR = val; reset = true; } |
3998
|
28 END_SET_CODE |
|
29 END_OPTION |
|
30 |
|
31 OPTION |
|
32 NAME = "relative tolerance" |
4050
|
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 |
4051
|
39 |
4050
|
40 @example |
5016
|
41 abs (local error in x(i)) |
|
42 <= rtol(i) * abs (Y(i)) + atol(i) |
4050
|
43 @end example |
|
44 END_DOC_ITEM |
3998
|
45 TYPE = "Array<double>" |
|
46 SET_ARG_TYPE = "const $TYPE&" |
|
47 INIT_BODY |
|
48 $OPTVAR.resize (1); |
|
49 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
|
50 END_INIT_BODY |
|
51 SET_CODE |
|
52 void set_$OPT (double val) |
|
53 { |
|
54 $OPTVAR.resize (1); |
|
55 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049
|
56 reset = true; |
3998
|
57 } |
|
58 |
|
59 void set_$OPT (const $TYPE& val) |
4049
|
60 { $OPTVAR = val; reset = true; } |
3998
|
61 END_SET_CODE |
|
62 END_OPTION |
|
63 |
|
64 OPTION |
4047
|
65 NAME = "compute consistent initial condition" |
4050
|
66 DOC_ITEM |
4051
|
67 If nonzero, @code{dassl} will attempt to compute a consistent set of intial |
4050
|
68 conditions. This is generally not reliable, so it is best to provide |
|
69 a consistent set and leave this option set to zero. |
|
70 END_DOC_ITEM |
4047
|
71 TYPE = "int" |
|
72 INIT_VALUE = "0" |
|
73 SET_EXPR = "val" |
|
74 END_OPTION |
|
75 |
|
76 OPTION |
|
77 NAME = "enforce nonnegativity constraints" |
4050
|
78 DOC_ITEM |
|
79 If you know that the solutions to your equations will always be |
|
80 nonnegative, it may help to set this parameter to a nonzero |
|
81 value. However, it is probably best to try leaving this option set to |
|
82 zero first, and only setting it to a nonzero value if that doesn't |
|
83 work very well. |
|
84 END_DOC_ITEM |
4047
|
85 TYPE = "int" |
|
86 INIT_VALUE = "0" |
|
87 SET_EXPR = "val" |
|
88 END_OPTION |
|
89 |
|
90 OPTION |
3998
|
91 NAME = "initial step size" |
4050
|
92 DOC_ITEM |
|
93 Differential-algebraic problems may occaisionally suffer from severe |
|
94 scaling difficulties on the first step. If you know a great deal |
|
95 about the scaling of your problem, you can help to alleviate this |
|
96 problem by specifying an initial stepsize. |
|
97 END_DOC_ITEM |
3998
|
98 TYPE = "double" |
|
99 INIT_VALUE = "-1.0" |
|
100 SET_EXPR = "(val >= 0.0) ? val : -1.0" |
|
101 END_OPTION |
|
102 |
|
103 OPTION |
4044
|
104 NAME = "maximum order" |
4050
|
105 DOC_ITEM |
|
106 Restrict the maximum order of the solution method. This option must |
|
107 be between 1 and 5, inclusive. |
|
108 END_DOC_ITEM |
4044
|
109 TYPE = "int" |
|
110 INIT_VALUE = "-1" |
|
111 SET_EXPR = "val" |
|
112 END_OPTION |
|
113 |
|
114 OPTION |
3998
|
115 NAME = "maximum step size" |
4050
|
116 DOC_ITEM |
|
117 Setting the maximum stepsize will avoid passing over very large |
4051
|
118 regions (default is not specified). |
4050
|
119 END_DOC_ITEM |
3998
|
120 TYPE = "double" |
|
121 INIT_VALUE = "-1.0" |
|
122 SET_EXPR = "(val >= 0.0) ? val : -1.0" |
|
123 END_OPTION |
4429
|
124 |
|
125 OPTION |
|
126 NAME = "step limit" |
|
127 DOC_ITEM |
|
128 Maximum number of integration steps to attempt on a single call to the |
|
129 underlying Fortran code. |
|
130 END_DOC_ITEM |
|
131 TYPE = "int" |
|
132 INIT_VALUE = "-1" |
|
133 SET_EXPR = "(val >= 0) ? val : -1" |
|
134 END_OPTION |