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 |
|
58 abs (local error in x(i)) <= rtol(i) * abs (Y(i)) + atol(i) |
|
59 @end example |
|
60 END_DOC_ITEM |
3998
|
61 TYPE = "Array<double>" |
|
62 SET_ARG_TYPE = "const $TYPE&" |
|
63 INIT_BODY |
|
64 $OPTVAR.resize (1); |
|
65 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
|
66 END_INIT_BODY |
|
67 SET_CODE |
|
68 void set_$OPT (double val) |
|
69 { |
|
70 $OPTVAR.resize (1); |
|
71 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049
|
72 reset = true; |
3998
|
73 } |
|
74 |
|
75 void set_$OPT (const $TYPE& val) |
4049
|
76 { $OPTVAR = val; reset = true; } |
3998
|
77 END_SET_CODE |
|
78 END_OPTION |
|
79 |
|
80 OPTION |
|
81 NAME = "initial step size" |
4050
|
82 DOC_ITEM |
7001
|
83 Differential-algebraic problems may occasionally suffer from severe |
4050
|
84 scaling difficulties on the first step. If you know a great deal |
|
85 about the scaling of your problem, you can help to alleviate this |
|
86 problem by specifying an initial stepsize. |
|
87 END_DOC_ITEM |
3998
|
88 TYPE = "double" |
|
89 INIT_VALUE = "-1.0" |
|
90 SET_EXPR = "(val >= 0.0) ? val : -1.0" |
|
91 END_OPTION |
|
92 |
|
93 OPTION |
4049
|
94 NAME = "maximum order" |
4050
|
95 DOC_ITEM |
|
96 Restrict the maximum order of the solution method. This option must |
|
97 be between 1 and 5, inclusive. |
|
98 END_DOC_ITEM |
5275
|
99 TYPE = "octave_idx_type" |
4049
|
100 INIT_VALUE = "-1" |
|
101 SET_EXPR = "val" |
|
102 END_OPTION |
|
103 |
|
104 OPTION |
3998
|
105 NAME = "maximum step size" |
4050
|
106 DOC_ITEM |
|
107 Setting the maximum stepsize will avoid passing over very large |
|
108 regions. |
|
109 END_DOC_ITEM |
3998
|
110 TYPE = "double" |
|
111 INIT_VALUE = "-1.0" |
|
112 SET_EXPR = "(val >= 0.0) ? val : -1.0" |
|
113 END_OPTION |
|
114 |
|
115 OPTION |
|
116 NAME = "step limit" |
4050
|
117 DOC_ITEM |
|
118 Maximum number of integration steps to attempt on a single call to the |
|
119 underlying Fortran code. |
|
120 END_DOC_ITEM |
5275
|
121 TYPE = "octave_idx_type" |
3998
|
122 INIT_VALUE = "-1" |
|
123 SET_EXPR = "(val >= 0) ? val : -1" |
|
124 END_OPTION |