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