7017
|
1 # Copyright (C) 2002, 2005, 2007 John W. Eaton |
|
2 # |
|
3 # This file is part of Octave. |
|
4 # |
|
5 # Octave is free software; you can redistribute it and/or modify it |
|
6 # under the terms of the GNU General Public License as published by the |
|
7 # Free Software Foundation; either version 3 of the License, or (at |
|
8 # your option) any later version. |
|
9 # |
|
10 # Octave is distributed in the hope that it will be useful, but WITHOUT |
|
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 # for more details. |
|
14 # |
|
15 # You should have received a copy of the GNU General Public License |
|
16 # along with Octave; see the file COPYING. If not, see |
|
17 # <http://www.gnu.org/licenses/>. |
|
18 |
3998
|
19 CLASS = "DASRT" |
|
20 |
4044
|
21 INCLUDE = "DAERT.h" |
|
22 |
3998
|
23 OPTION |
|
24 NAME = "absolute tolerance" |
4050
|
25 DOC_ITEM |
|
26 Absolute tolerance. May be either vector or scalar. If a vector, it |
|
27 must match the dimension of the state vector, and the relative |
|
28 tolerance must also be a vector of the same length. |
|
29 END_DOC_ITEM |
3998
|
30 TYPE = "Array<double>" |
|
31 SET_ARG_TYPE = "const $TYPE&" |
|
32 INIT_BODY |
|
33 $OPTVAR.resize (1); |
|
34 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
|
35 END_INIT_BODY |
|
36 SET_CODE |
|
37 void set_$OPT (double val) |
|
38 { |
|
39 $OPTVAR.resize (1); |
|
40 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049
|
41 reset = true; |
3998
|
42 } |
|
43 |
|
44 void set_$OPT (const $TYPE& val) |
4049
|
45 { $OPTVAR = val; reset = true; } |
3998
|
46 END_SET_CODE |
|
47 END_OPTION |
|
48 |
|
49 OPTION |
|
50 NAME = "relative tolerance" |
4050
|
51 DOC_ITEM |
|
52 Relative tolerance. May be either vector or scalar. If a vector, it |
|
53 must match the dimension of the state vector, and the absolute |
|
54 tolerance must also be a vector of the same length. |
|
55 |
|
56 The local error test applied at each integration step is |
|
57 @example |
7081
|
58 abs (local error in x(i)) <= ... |
|
59 rtol(i) * abs (Y(i)) + atol(i) |
4050
|
60 @end example |
|
61 END_DOC_ITEM |
3998
|
62 TYPE = "Array<double>" |
|
63 SET_ARG_TYPE = "const $TYPE&" |
|
64 INIT_BODY |
|
65 $OPTVAR.resize (1); |
|
66 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
|
67 END_INIT_BODY |
|
68 SET_CODE |
|
69 void set_$OPT (double val) |
|
70 { |
|
71 $OPTVAR.resize (1); |
|
72 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049
|
73 reset = true; |
3998
|
74 } |
|
75 |
|
76 void set_$OPT (const $TYPE& val) |
4049
|
77 { $OPTVAR = val; reset = true; } |
3998
|
78 END_SET_CODE |
|
79 END_OPTION |
|
80 |
|
81 OPTION |
|
82 NAME = "initial step size" |
4050
|
83 DOC_ITEM |
7001
|
84 Differential-algebraic problems may occasionally suffer from severe |
4050
|
85 scaling difficulties on the first step. If you know a great deal |
|
86 about the scaling of your problem, you can help to alleviate this |
|
87 problem by specifying an initial stepsize. |
|
88 END_DOC_ITEM |
3998
|
89 TYPE = "double" |
|
90 INIT_VALUE = "-1.0" |
|
91 SET_EXPR = "(val >= 0.0) ? val : -1.0" |
|
92 END_OPTION |
|
93 |
|
94 OPTION |
4049
|
95 NAME = "maximum order" |
4050
|
96 DOC_ITEM |
|
97 Restrict the maximum order of the solution method. This option must |
|
98 be between 1 and 5, inclusive. |
|
99 END_DOC_ITEM |
5275
|
100 TYPE = "octave_idx_type" |
4049
|
101 INIT_VALUE = "-1" |
|
102 SET_EXPR = "val" |
|
103 END_OPTION |
|
104 |
|
105 OPTION |
3998
|
106 NAME = "maximum step size" |
4050
|
107 DOC_ITEM |
|
108 Setting the maximum stepsize will avoid passing over very large |
|
109 regions. |
|
110 END_DOC_ITEM |
3998
|
111 TYPE = "double" |
|
112 INIT_VALUE = "-1.0" |
|
113 SET_EXPR = "(val >= 0.0) ? val : -1.0" |
|
114 END_OPTION |
|
115 |
|
116 OPTION |
|
117 NAME = "step limit" |
4050
|
118 DOC_ITEM |
|
119 Maximum number of integration steps to attempt on a single call to the |
|
120 underlying Fortran code. |
|
121 END_DOC_ITEM |
5275
|
122 TYPE = "octave_idx_type" |
3998
|
123 INIT_VALUE = "-1" |
|
124 SET_EXPR = "(val >= 0) ? val : -1" |
|
125 END_OPTION |