comparison liboctave/numeric/LSODE-opts.in @ 31249:de6fc38c78c6

Make Jacobian types offered by dlsode.f accessible by lsode (bug #31626). * liboctave/numeric/LSODE-opts.in: Add options "jacobian type", "lower jacobian subdiagonals", and "upper jacobian subdiagonals". * liboctave/numeric/LSODE.cc (file scope, lsode_j, LSODE::do_integrate (double)): Handle new configurable Jacobian types. * build-aux/mk-opts.pl: Don't implicitly convert to integer in condition.
author Olaf Till <olaf.till@uni-jena.de>
date Fri, 12 Nov 2010 08:53:05 +0100
parents 796f54d4ddbf
children a40c0b7aa376
comparison
equal deleted inserted replaced
31248:8b75954a4670 31249:de6fc38c78c6
162 END_DOC_ITEM 162 END_DOC_ITEM
163 TYPE = "octave_idx_type" 163 TYPE = "octave_idx_type"
164 INIT_VALUE = "100000" 164 INIT_VALUE = "100000"
165 SET_EXPR = "val" 165 SET_EXPR = "val"
166 END_OPTION 166 END_OPTION
167
168 OPTION
169 NAME = "jacobian type"
170 DOC_ITEM
171 A string specifying the type of Jacobian used with the stiff backward
172 differentiation formula (BDF) integration method. Valid values are
173
174 @table @asis
175 @item @qcode{"full"}
176 The default. All partial derivatives are approximated or used from the
177 user-supplied Jacobian function.
178
179 @item @qcode{"banded"}
180 Only the diagonal and the number of lower and upper subdiagonals specified by
181 the options @qcode{"lower jacobian subdiagonals"} and @qcode{"upper jacobian
182 subdiagonals"}, respectively, are approximated or used from the user-supplied
183 Jacobian function. A user-supplied Jacobian function may set all other
184 partial derivatives to arbitrary values.
185
186 @item @qcode{"diagonal"}
187 If a Jacobian function is supplied by the user, this setting has no effect.
188 A Jacobian approximated by @code{lsode} is restricted to the diagonal, where
189 each partial derivative is computed by applying a finite change to all
190 elements of the state together; if the real Jacobian is indeed always diagonal,
191 this has the same effect as applying the finite change only to the respective
192 element of the state, but is more efficient.
193 @end table
194
195 END_DOC_ITEM
196 TYPE = "std::string"
197 SET_ARG_TYPE = "const $TYPE&"
198 INIT_VALUE = ""full""
199 SET_BODY
200 if (val == "full" || val == "banded" || val == "diagonal")
201 $OPTVAR = val;
202 else
203 (*current_liboctave_error_handler)
204 ("lsode_options: jacobian type must be \"full\", \"banded\", or \"diagonal\"");
205 END_SET_BODY
206 END_OPTION
207
208 OPTION
209 NAME = "lower jacobian subdiagonals"
210 DOC_ITEM
211 Number of lower subdiagonals used if option @qcode{"jacobian type"} is set to
212 @qcode{"banded"}. The default is zero.
213
214 END_DOC_ITEM
215 TYPE = "octave_idx_type"
216 INIT_VALUE = "0"
217 SET_EXPR = "val"
218 END_OPTION
219
220 OPTION
221 NAME = "upper jacobian subdiagonals"
222 DOC_ITEM
223 Number of upper subdiagonals used if option @qcode{"jacobian type"} is set to
224 @qcode{"banded"}. The default is zero.
225
226 END_DOC_ITEM
227 TYPE = "octave_idx_type"
228 INIT_VALUE = "0"
229 SET_EXPR = "val"
230 END_OPTION