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

SciPy

According to the SciPy web page, "SciPy is an open source library of scientific tools for Python."

The VFGEN SciPy Command

Python files that can be used with the SciPy ODEINT routine are created by the command

$ vfgen scipy vector_field_file.vf

The files created are [name].py and, if the option demo=yes option is given, [name]_demo.py, where [name] is the name of the vector field given in the vector field file. The Python file [name].py will contain the functions [name]_vf and [name]_jac.

Options

func If the option func=yes is given, VFGEN also converts any user-defined functions in the vector field file into functions in the Python file. The names of the functions will be the same as those given in the vector field file, with the name of the vector field prepended.
Default: func=no
demo If the option demo=yes is given, the file [name]_demo.py will contain a Python script for a command-line ODE solver for the vector field. The example below shows how this file can be used.
Default: demo=no

Example

Here is a sample vector field file: pendulum.vf.
The files created by
$ vfgen scipy:func=yes,demo=yes pendulum.vf

are pendulum.py and pendulum_demo.py. Run the demonstration program with a command such as
$ python pendulum_demo.py theta=3.1 b=0.5 stoptime=10 > pend.dat
This will write the solution data to the file pend.dat.
Copyright © 2005-2007 Warren Weckesser