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