BIFPACK
BIFPACK is a Fortran 77 package for continuation, bifurcation, and stability analysis, written by Rüdiger Seydel. It is the companion software to his textbook Practical Bifurcation and Stability Analysis (3rd edition, Interdisciplinary Applied Mathematics vol. 5, Springer) — anyone working through that book can use the software in this repository exactly as the book and BIFPACK's own manual describe.
This repository provides two ways to use BIFPACK, side by side:
- The original Fortran interface — build BIFPACK's libraries and
example programs directly with the included
Makefile, and write your own models as Fortran source compiled and linked against them. Start withexamples/README.md;src/README.md,solvers/README.mdandbin/README.mddescribe the rest of the Fortran source tree. - A Python interface — the same underlying BIFPACK Fortran
engine, driven from ordinary Python model functions, with results
as plain Python data.
bifpack.algebraic(continuation and stability analysis of systems of algebraic equations),bifpack.periodic_orbits(periodic solutions of autonomous ODEs), andbifpack.boundary_value(two-point ODE boundary-value problems) are all complete and tested, along withbifpack.diagramsfor plotting a result with Matplotlib — seedocs/TODO.mdfor current status.
Both interfaces are built from, and drive, the same unmodified BIFPACK
Fortran source under src//solvers/ — see AGENTS.md for the
standing rule that this source is never edited, and docs/TODO.md for
the Python interface's current status and design record.
Getting started (Fortran)
make static # lib/libbifpack.a, lib/libbifsolv.a
make shared # lib/libbifpack_a.so / _b.so / _d.so
make bin # bin/bifpack-* post-processing utilities
make examples # all ten documented example programs
make all # all of the above
Requires gfortran and GNU Make. See examples/README.md for how to
run an example once built, and how to write and build your own model.
Getting started (Python)
pip install bifpack
compiles BIFPACK's own Fortran source as part of the install (needs
gfortran and GNU Make on your own machine - the only two
requirements beyond Python itself and Matplotlib, both installed
automatically) - no separate make capi step needed.
import bifpack.algebraic as algebraic
def f(y, par):
return [y[0] ** 2 - par] # y**2 - par = 0
result = algebraic.run(f, y0=[1.0], par0=1.0, step=0.1, max_steps=20)
branch = result.branches[0]
for point in branch.points:
print(point.parameters[0], point.state[0], point.point_type)
Working from a checkout instead (contributing, or wanting the example
Fortran programs too) - pip install . from the repository root does
the same thing; or skip packaging entirely with make capi followed
by PYTHONPATH=src.
Full documentation - a tutorial, a complete user guide, the API
reference, and a developer's guide - lives under docs/ (Sphinx
source) and builds with make docs (needs make capi first) into
docs/_build/html/.
Repository layout
src/— BIFPACK's own core Fortran source (continuation and bifurcation analysis: algebraic equations, boundary-value problems, periodic solutions). Seesrc/README.md.solvers/— the generic numerical building blocks BIFPACK's core relies on (a Newton-type solver, a linear-equation solver, EISPACK eigenvalue routines, an ODE integrator and two alternative boundary-value solvers). Seesolvers/README.md.bin/— standalone utilities for post-processing BIFPACK's own output-record files. Seebin/README.md.examples/— ten worked example models from the book, each showing how to write and build a BIFPACK model. Seeexamples/README.md.docs/— BIFPACK's own manual (manual.asc, plain text — the authoritative reference for every calling convention, option, and output-file format mentioned in this repository's own READMEs) andbifpack.ps;TODO.mdrecords this repository's own reorganization and Python-interface design decisions, and current status.capi/— a small Fortranbind(c)shim giving the Python interface a C-ABI-safe entry point into BIFPACK's own calling convention, without editing any upstream file (AGENTS.md's "Never Edit Upstream BIFPACK Source").src/bifpack/— the Python package:results.py(backend-agnostic result data structures),algebraic//boundary_value//periodic_orbits/(one sub-package per BIFPACK problem class, seedocs/guide/problem-classes.rst),diagrams.py(plotting a result with Matplotlib).tests/— the Python interface's own regression suite.pyproject.toml/setup.py/MANIFEST.in— the Python package's own packaging metadata and build step (setup.py's own custombuild_pycommand compiles BIFPACK's own Fortran source as part ofpip install- see its own module docstring).Makefile— builds everything above; see "Getting started" above andAGENTS.mdfor how it is organized (one shared library per documented file grouping, to avoid combining BIFPACK routines that were never meant to coexist in one binary).LICENSE— the license (GPL-2.0-or-later) covering both BIFPACK itself and bifpack; see also the disclaimer of warranty indocs/manual.asc.AGENTS.md— standing conventions for anyone (human or agent) working in this repository.
License
BIFPACK and bifpack are both distributed under the GNU General Public
License; see the enclosed file LICENSE. Before first use, read
docs/manual.asc, in particular its disclaimer of warranty.
Release files for bifpack 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bifpack-0.1.0.tar.gz | 233.0 kB | Details |
Release files / bifpack-0.1.0.tar.gz
| Download URL | bifpack-0.1.0.tar.gz |
|---|---|
| Size | 233.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75dab5ceeeaab0359fa3ed675b778ad0f50f87a21ecf924525dcbb682932f354
|
|
BLAKE2b-256 checksum How to use checksums |
6bdf8c6bfc5bc213c8f7a0a94dc726cd998573c422751ed78b99e06bc77bf446
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|