Move some ODE package functions from Octave-Forge to core
Introduction[edit]
Parts of the ODE package have recently been incorporated into core. However, there are several more functions which should be shifted from the ODE. The core is much stricter about coding conventions which requires rigorous cleaning of the files before they are introduced to the core.
Conversion Tasks[edit]
- Copy over GNU public license statement from any existing core m-file to start of file.
- Update Copyright statement at head of file.
- Replace all single quotes (') with double quotes (").
- Replace logical not operator (~) with the not operator (!).
- Replace '%' comment character with '#'. Use '##' to precede comments which stand alone on a line. Use '#" for comments on the same line as code.
- Make sure all uses of "end" are keyword specific such as endif, endfor, endwhile, etc.
- Use 2 spaces for each indent level. Replace all tabs with spaces.
- Delete 'v' used as first character for all variables. For example, a variable "vtmp" should just be written as "tmp"
- Try to lowercase or rename any CamelCase variables.
- Replace "OdePkg:" error ID with "Octave:".
- Preface error messages with "FUNCTION_NAME:". For example, the following is in ode45.m: error ("Octave:invalid-input-arg", "ode45: TRANGE must be a numeric vector");
- Match variable names described in documentation to those used in the function header. For example, in ode45.m the documentation is "## @deftypefn {Function File} {[@var{t}, @var{y}] =} ode45 (@var{fun}, @var{trange}, @var{init})" and the function prototype is "function varargout = ode45 (fun, trange, init, varargin)"
- Potentially update @seealso links in other m-files to link to the new file.
- Add %!demo or BIST %!test blocks below "endfunction" keyword. There should be two newlines between "endfunction" and the start of any '%!' blocks.
- Potentially remove the newly implemented function from scripts/help/__unimplemented__.m.
- Add new m-file to appropriate location in scripts/ode/module.mk.
- Consider adding a @DOCSTRING(FUNCTION_NAME) entry in the appropriate location in doc/interpreter/diffeq.txi.
The list of files to move from the ODE package is shown in the Files section of this page. To avoid duplication, sign up for a particular file by editing the Files section of this wiki page and adding your name next to the file. When you have finished converting a file, let a Maintainer know so that we can check in the changes. Also, add the wiki tags
<strike> ... </strike>
to the Files section to cross the file off the list.
Files[edit]
odeplot.m (Stefan Miereis)(Patch submitted) (Patch pushed) (Removed from odepkg)ode23.m (Stefan Miereis)(Patch submitted) (Patch pushed)runge_kutta_23.m (Stefan Miereis)(Patch submitted) (Patch pushed)
Changes to odepkg to maintain compatibility with new release[edit]
As part of the inclusion in core of ODE solvers, some private functions or other sorts of utility functions are being moved to core as well.
Some changes made in order to adapt these functions to the coding style in core may break compatibility with solvers that will remain in odepkg, so the latter need to be adapted as well.
- remove prefix 'v' from field names in options structs
- input and output arguments of the steppers should be made compliant to the call in integrate_adaptive.m. The main example in core is runge_kutta_45_dorpri.m