Mercurial > hg > octave-nkf
annotate liboctave/DASSL-opts.in @ 10447:12d25a1d84bf
Use gnulib headers instead of C++ std headers where needed.
author | David Grundberg <davidg@cs.umu.se> |
---|---|
date | Wed, 24 Mar 2010 17:27:58 +0100 |
parents | 12884915a8e4 |
children | fbd7843974fa |
rev | line source |
---|---|
9245 | 1 # Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 John W. Eaton |
7017 | 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 = "DASSL" |
20 | |
4044 | 21 INCLUDE = "DAE.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 | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
33 $OPTVAR.resize (1, 1); |
3998 | 34 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
35 END_INIT_BODY | |
36 SET_CODE | |
37 void set_$OPT (double val) | |
38 { | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
39 $OPTVAR.resize (1, 1); |
3998 | 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 | |
4051 | 57 |
4050 | 58 @example |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7017
diff
changeset
|
59 @group |
5016 | 60 abs (local error in x(i)) |
61 <= rtol(i) * abs (Y(i)) + atol(i) | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7017
diff
changeset
|
62 @end group |
4050 | 63 @end example |
64 END_DOC_ITEM | |
3998 | 65 TYPE = "Array<double>" |
66 SET_ARG_TYPE = "const $TYPE&" | |
67 INIT_BODY | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
68 $OPTVAR.resize (1, 1); |
3998 | 69 $OPTVAR(0) = ::sqrt (DBL_EPSILON); |
70 END_INIT_BODY | |
71 SET_CODE | |
72 void set_$OPT (double val) | |
73 { | |
10350
12884915a8e4
merge MArray classes & improve Array interface
Jaroslav Hajek <highegg@gmail.com>
parents:
9245
diff
changeset
|
74 $OPTVAR.resize (1, 1); |
3998 | 75 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); |
4049 | 76 reset = true; |
3998 | 77 } |
78 | |
79 void set_$OPT (const $TYPE& val) | |
4049 | 80 { $OPTVAR = val; reset = true; } |
3998 | 81 END_SET_CODE |
82 END_OPTION | |
83 | |
84 OPTION | |
4047 | 85 NAME = "compute consistent initial condition" |
4050 | 86 DOC_ITEM |
7007 | 87 If nonzero, @code{dassl} will attempt to compute a consistent set of initial |
4050 | 88 conditions. This is generally not reliable, so it is best to provide |
89 a consistent set and leave this option set to zero. | |
90 END_DOC_ITEM | |
5275 | 91 TYPE = "octave_idx_type" |
4047 | 92 INIT_VALUE = "0" |
93 SET_EXPR = "val" | |
94 END_OPTION | |
95 | |
96 OPTION | |
97 NAME = "enforce nonnegativity constraints" | |
4050 | 98 DOC_ITEM |
99 If you know that the solutions to your equations will always be | |
100 nonnegative, it may help to set this parameter to a nonzero | |
101 value. However, it is probably best to try leaving this option set to | |
102 zero first, and only setting it to a nonzero value if that doesn't | |
103 work very well. | |
104 END_DOC_ITEM | |
5275 | 105 TYPE = "octave_idx_type" |
4047 | 106 INIT_VALUE = "0" |
107 SET_EXPR = "val" | |
108 END_OPTION | |
109 | |
110 OPTION | |
3998 | 111 NAME = "initial step size" |
4050 | 112 DOC_ITEM |
7001 | 113 Differential-algebraic problems may occasionally suffer from severe |
4050 | 114 scaling difficulties on the first step. If you know a great deal |
115 about the scaling of your problem, you can help to alleviate this | |
116 problem by specifying an initial stepsize. | |
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 | |
122 | |
123 OPTION | |
4044 | 124 NAME = "maximum order" |
4050 | 125 DOC_ITEM |
126 Restrict the maximum order of the solution method. This option must | |
127 be between 1 and 5, inclusive. | |
128 END_DOC_ITEM | |
5275 | 129 TYPE = "octave_idx_type" |
4044 | 130 INIT_VALUE = "-1" |
131 SET_EXPR = "val" | |
132 END_OPTION | |
133 | |
134 OPTION | |
3998 | 135 NAME = "maximum step size" |
4050 | 136 DOC_ITEM |
137 Setting the maximum stepsize will avoid passing over very large | |
4051 | 138 regions (default is not specified). |
4050 | 139 END_DOC_ITEM |
3998 | 140 TYPE = "double" |
141 INIT_VALUE = "-1.0" | |
142 SET_EXPR = "(val >= 0.0) ? val : -1.0" | |
143 END_OPTION | |
4429 | 144 |
145 OPTION | |
146 NAME = "step limit" | |
147 DOC_ITEM | |
148 Maximum number of integration steps to attempt on a single call to the | |
149 underlying Fortran code. | |
150 END_DOC_ITEM | |
5275 | 151 TYPE = "octave_idx_type" |
4429 | 152 INIT_VALUE = "-1" |
153 SET_EXPR = "(val >= 0) ? val : -1" | |
154 END_OPTION |