VFGEN
  • Home
  • Download
  • Support
  • User's Guide
  • §   Vector Field File
  • §   ADOL-C
  • §   AUTO
  • §   Check
  • §   CVODE
  • §   DDE23
  • §   DDE-BIFTOOL
  • §   DDE_SOLVER
  • §   Delay2ODE
  • §   DSTool
  • §   EVF
  • §   GSL
  • §   Help
  • §   Javascript
  • §   LaTeX
  • §   LSODA
  • §   MATCONT
  • §   MATLAB
  • §   Octave
  • §   PDDE-CONT
  • §   PyDSTool
  • §   PyGSL
  • §   R
  • §   RADAU5
  • §   Scilab
  • §   SciPy
  • §   Taylor
  • §   XPP

VFGEN

A Vector Field File Generator

for differential equation solvers and other computational tools


Warren Weckesser

Features
  • Generate code for ordinary and delay differential equations.
  • Specify your equations once, and export to multiple file formats.
  • Generate analytical expressions for Jacobians and higher derivatives automatically.
  • Available export formats include MATLAB, Scilab, AUTO, GNU Scientific Library, SciPy, PyDSTool, XPP and more.
New in Version 2.5
  • Added the r command for generating R code to use with the deSolve package.
  • Added support for versions 2.6.0 and 2.7.0 of CVODE
  • Restored support for PyGSL.


Overview

There are many excellent programs available for solving differential equations and computing bifurcations of vector fields. However, each has its own format for specifying the vector field that defines the differential equation. VFGEN lets you define your vector field once (using XML), and export the vector field in several formats. VFGEN uses a C++ symbolic algebra library (GiNaC) to generate Jacobians and higher derivatives automatically.

An article about VFGEN was published in the Journal of Numerical Analysis, Industrial and Applied Mathematics, Volume 3(1-2).


Here, grouped roughly by category, are the output formats available:

ODE solver libraries CVODE (C), GNU Scientific Library (C), ODEPACK solvers LSODA, LSODAR and LSODE (Fortran 77), MATLAB, Octave, PyGSL (Python), R (using the deSolve package), RADAU5 (Fortran 77), Scilab, SciPy (Python)
Bifurcation analysis AUTO, DDE-BIFTOOL, DSTool, MATCONT, PDDE-CONT, PyDSTool, XPP
Delay equations DDE23 (MATLAB), DDE-BIFTOOL (MATLAB), DDE_SOLVER (Fortran 90), Delay2ODE, PDDE-CONT (C++), R (using the deSolve package), XPP
Dynamical systems programs DSTool, MATCONT (MATLAB), PyDSTool (Python), XPP
Other ADOL-C, Delay2ODE, EVF (variational equations), Javascript, LaTeX, Taylor

Many of the commands have a demo option. With this option, you can quickly develop a working program with the tool of your choice.



Recent changes

Version 2.5.0 (XX May 2014)

It has been a very long time since the last release. An assortment of bug reports and requests for enhancements were the inspiration for resuming work on VFGEN.

  • The r command was added. This command generates R code to be used with the deSolve package.
  • CVODE output was updated to support versions 2.6.0 and 2.7.0. Version 2.7.0 is now the default.
  • The Scilab demo uses exec() instead of getf().
  • Eliminated the num option of the pygsl command. VFGEN will only generate PyGSL code that uses numpy.
  • Limit the length of lines in Fortran 90 code generated by VFGEN.
  • The adolc command now generates code for ADOL-C version 2. (Specifically, the generated code was tested with ADOL-C 2.5.0.)
  • The demo generated by the pydstool command was updated.
  • INTENT statements were added to the Fortran 90 code generated by the dde_solver command.
  • Fixed a couple bugs in the DDE BIFTOOL output, including a misnamed array (jac_ was incorrectly called jacp_).
  • In the VFGEN source code, more const declarations were added to eliminate deprecation warnings when compiling.
  • The source code was updated to use version 1.6.2 of GiNaC.
Note: I no longer own a copy of Matlab, so the commands that generate Matlab code--dde23, dde-biftool, matcont and matlab--have not received any work since the last version of VFGEN.

Version 2.4.0 (17 July 2008)
  • Added the javascript command.
  • Improved the docstrings in the code generated for SciPy.
  • The command-line demo solver created for SciPy now includes the values of any Functions in its output.
  • Bug fixes: The dde23, matlab and scilab commands didn't handle the default value of the parstyle option correctly. Also, they generated bad code if there were no Parameters.
  • The ODE solver for the demo program created by the Matlab command was changed to ode45 (instead of ode15s).
  • The Octave demo now passes the vector field and jacobian function names in a cell array.
  • Numerous other tweaks to the VFGEN source code (not visible to a user).

Version 2.3.1 (5 April 2008)
  • Fixed the help messages for the auto, pydstool, pygsl, and scipy commands, and reformatted a few other help messages.
Version 2.3.0 (3 April 2008)
  • Changed the convention that is followed when naming Python functions for the vector field and its Jacobian. The new style is a bit more "Pythonic". This affects the PyGSL, PyDSTool and SciPy commands.
    (Unfortunately, the PyGSL changes have not been tested. I haven't been able to install PyGSL on my current computer, and I didn't want to hold back the release while I debug my PyGSL installation. Reports on the use of the VFGEN PyGSL command, good or bad, are appreciated!)
  • Added the option lang to the AUTO command. This gives the user the choice of generating C or FORTRAN code.
  • Fixed a bug in the C code generated by AUTO. Expressions weren't fully substituted before taking a derivative with respect to a parameter.
  • The code now checks that any options specified are known options. Previously, unknown option names were silently ignored.
Version 2.2.0 (17 March 2008)
  • New commands: Added the lsoda and pddecont commands.
  • Added the par option to the evf command. With this option, you can generate an extended vector field to compute parametric sensitivity.
  • Fixed a major bug in the handling of Expressions. For several of the commands, if an Expression used another Expression, it would not be evaluated correctly when a Jacobian was computed.
  • Improved the error checking that occurs when VFGEN reads a vector field file.
  • Tweaked demos created by the matlab and scilab commands: fixed the spacing of the fields in the matlab GUI; use subplots in the plots created by the scilab demo.
  • Fixed a bug in which the demo programs created by the GSL and CVODE commands would not compile if the vector field had no parameters.
  • Fixed the bug that caused VFGEN to crash when the delay2ode command was applied to a delay equation in which a lag was not a single symbol.
  • Fixed the setting of the values of XPP numbers, pars, and initial conditions when the default initial conditions, default Parameter values, or the values of Constants are expressed in terms of previously defined symbols.
  • Many more minor changes and bug fixes.
Version 2.1.0 (3 June 2007)
  • New commands: Added the octave, pydstool and radau5 commands.
  • The demo program created by the cvode command outputs each point that it computes, instead of a set of 201 evenly spaced points.
  • The parstyle option was removed from the matcont command. (Each parameter must be given as a separate argument in the vector field function and its derivatives.)
  • Added brief docstrings to the vector field functions created by the pygsl and scipy commands.
Version 2.0.0 (4 May 2007)
  • VFGEN can generate code for delay equations.
  • New commands: adolc, dde23, ddebiftool, dde_solver, delay2ode, help, latex, taylor.
  • Numerous enhancements (and a few bug fixes) were made throughout the commands.
Copyright © 2005-2014 Warren Weckesser