Mercurial > octave
annotate liboctave/numeric/LSODE-opts.in @ 30564:796f54d4ddbf stable
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2021.
In all .txi and .texi files except gpl.txi and gpl.texi in the
doc/liboctave and doc/interpreter directories, change the copyright
to "Octave Project Developers", the same as used for other source
files. Update copyright notices for 2022 (not done since 2019). For
gpl.txi and gpl.texi, change the copyright notice to be "Free Software
Foundation, Inc." and leave the date at 2007 only because this file
only contains the text of the GPL, not anything created by the Octave
Project Developers.
Add Paul Thomas to contributors.in.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Dec 2021 18:22:40 -0500 |
parents | b3717fd85e49 |
children | de6fc38c78c6 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 ######################################################################## |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
2 ## |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30046
diff
changeset
|
3 ## Copyright (C) 2002-2022 The Octave Project Developers |
29357
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
4 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
5 ## See the file COPYRIGHT.md in the top-level directory of this |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
6 ## distribution or <https://octave.org/copyright/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
7 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
8 ## This file is part of Octave. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
9 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
11 ## under the terms of the GNU General Public License as published by |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
13 ## (at your option) any later version. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
14 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
15 ## Octave is distributed in the hope that it will be useful, but |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
18 ## GNU General Public License for more details. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
19 ## |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
20 ## You should have received a copy of the GNU General Public License |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
21 ## along with Octave; see the file COPYING. If not, see |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
22 ## <https://www.gnu.org/licenses/>. |
bbbe4dcc7200
use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
23 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 ######################################################################## |
7017 | 25 |
3998 | 26 CLASS = "LSODE" |
27 | |
4044 | 28 INCLUDE = "ODE.h" |
29 | |
3998 | 30 OPTION |
31 NAME = "absolute tolerance" | |
4051 | 32 DOC_ITEM |
33 Absolute tolerance. May be either vector or scalar. If a vector, it | |
34 must match the dimension of the state vector. | |
10840 | 35 |
4051 | 36 END_DOC_ITEM |
3998 | 37 TYPE = "Array<double>" |
38 SET_ARG_TYPE = "const $TYPE&" | |
39 INIT_BODY | |
11574
a83bad07f7e3
attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
40 $OPTVAR.resize (dim_vector (1, 1)); |
15220
61822c866ba1
use std::numeric_limits<T>::epsilon in C++ code
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
41 $OPTVAR(0) = ::sqrt (std::numeric_limits<double>::epsilon ()); |
3998 | 42 END_INIT_BODY |
43 SET_CODE | |
44 void set_$OPT (double val) | |
45 { | |
11574
a83bad07f7e3
attempt better backward compatibility for Array resize functions
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
46 $OPTVAR.resize (dim_vector (1, 1)); |
15220
61822c866ba1
use std::numeric_limits<T>::epsilon in C++ code
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
47 $OPTVAR(0) = (val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ()); |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
48 m_reset = true; |
3998 | 49 } |
50 | |
51 void set_$OPT (const $TYPE& val) | |
30046
b3717fd85e49
maint: use "m_" prefix for member variables ODE/DAE classes in liboctave/numeric.
Rik <rik@octave.org>
parents:
29358
diff
changeset
|
52 { $OPTVAR = val; m_reset = true; } |
3998 | 53 END_SET_CODE |
54 END_OPTION | |
55 | |
56 OPTION | |
4051 | 57 NAME = "relative tolerance" |
58 DOC_ITEM | |
59 Relative tolerance parameter. Unlike the absolute tolerance, this | |
60 parameter may only be a scalar. | |
61 | |
62 The local error test applied at each integration step is | |
63 | |
64 @example | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7081
diff
changeset
|
65 @group |
7081 | 66 abs (local error in x(i)) <= ... |
67 rtol * abs (y(i)) + atol(i) | |
9067
8970b4b10e9f
Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents:
7081
diff
changeset
|
68 @end group |
4051 | 69 @end example |
10840 | 70 |
4051 | 71 END_DOC_ITEM |
72 TYPE = "double" | |
15220
61822c866ba1
use std::numeric_limits<T>::epsilon in C++ code
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
73 INIT_VALUE = "::sqrt (std::numeric_limits<double>::epsilon ())" |
61822c866ba1
use std::numeric_limits<T>::epsilon in C++ code
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
74 SET_EXPR = "(val > 0.0) ? val : ::sqrt (std::numeric_limits<double>::epsilon ())" |
4051 | 75 END_OPTION |
76 | |
77 OPTION | |
3998 | 78 NAME = "integration method" |
4231 | 79 DOC_ITEM |
7007 | 80 A string specifying the method of integration to use to solve the ODE |
4051 | 81 system. Valid values are |
82 | |
83 @table @asis | |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
84 @item @qcode{"adams"} |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
85 @itemx @qcode{"non-stiff"} |
4051 | 86 No Jacobian used (even if it is available). |
10840 | 87 |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
88 @item @qcode{"bdf"} |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
89 @itemx @qcode{"stiff"} |
4051 | 90 Use stiff backward differentiation formula (BDF) method. If a |
91 function to compute the Jacobian is not supplied, @code{lsode} will | |
92 compute a finite difference approximation of the Jacobian matrix. | |
93 @end table | |
10840 | 94 |
4051 | 95 END_DOC_ITEM |
3998 | 96 TYPE = "std::string" |
97 SET_ARG_TYPE = "const $TYPE&" | |
98 INIT_VALUE = ""stiff"" | |
99 SET_BODY | |
100 if (val == "stiff" || val == "bdf") | |
101 $OPTVAR = "stiff"; | |
102 else if (val == "non-stiff" || val == "adams") | |
103 $OPTVAR = "non-stiff"; | |
104 else | |
105 (*current_liboctave_error_handler) | |
106 ("lsode_options: method must be \"stiff\", \"bdf\", \"non-stiff\", or \"adams\""); | |
107 END_SET_BODY | |
108 END_OPTION | |
109 | |
110 OPTION | |
111 NAME = "initial step size" | |
4051 | 112 DOC_ITEM |
113 The step size to be attempted on the first step (default is determined | |
114 automatically). | |
10840 | 115 |
4051 | 116 END_DOC_ITEM |
3998 | 117 TYPE = "double" |
118 INIT_VALUE = "-1.0" | |
119 SET_EXPR = "(val >= 0.0) ? val : -1.0" | |
120 END_OPTION | |
121 | |
122 OPTION | |
4231 | 123 NAME = "maximum order" |
124 DOC_ITEM | |
125 Restrict the maximum order of the solution method. If using the Adams | |
126 method, this option must be between 1 and 12. Otherwise, it must be | |
127 between 1 and 5, inclusive. | |
10840 | 128 |
4231 | 129 END_DOC_ITEM |
5275 | 130 TYPE = "octave_idx_type" |
4231 | 131 INIT_VALUE = "-1" |
132 SET_EXPR = "val" | |
133 END_OPTION | |
134 | |
135 OPTION | |
3998 | 136 NAME = "maximum step size" |
4051 | 137 DOC_ITEM |
138 Setting the maximum stepsize will avoid passing over very large | |
139 regions (default is not specified). | |
10840 | 140 |
4051 | 141 END_DOC_ITEM |
3998 | 142 TYPE = "double" |
143 INIT_VALUE = "-1.0" | |
144 SET_EXPR = "(val >= 0.0) ? val : -1.0" | |
145 END_OPTION | |
146 | |
147 OPTION | |
148 NAME = "minimum step size" | |
4051 | 149 DOC_ITEM |
150 The minimum absolute step size allowed (default is 0). | |
10840 | 151 |
4051 | 152 END_DOC_ITEM |
3998 | 153 TYPE = "double" |
154 INIT_VALUE = "0.0" | |
155 SET_EXPR = "(val >= 0.0) ? val : 0.0" | |
156 END_OPTION | |
157 | |
158 OPTION | |
159 NAME = "step limit" | |
4051 | 160 DOC_ITEM |
161 Maximum number of steps allowed (default is 100000). | |
162 END_DOC_ITEM | |
5275 | 163 TYPE = "octave_idx_type" |
3998 | 164 INIT_VALUE = "100000" |
165 SET_EXPR = "val" | |
166 END_OPTION |