A numerical path continuation software written in Python.
Example of a bifurcation diagram with snaking in the Swift-Hohenberg equation obtained with bice, see the corresponding SHE demo.
To install the latest published version from PyPI simply execute:
pip3 install biceIf you instead want to install the package locally, e.g. for development purposes, you may download the latest version from this git and install it using:
git clone https://github.com/simon123h/bice
pip3 install -e bice/in any directory of your choice.
To set up a local development environment with all dependencies, it is recommended to use a virtual environment:
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activate
# Install the package in editable mode with development dependencies
pip install -e ".[dev]"# Create a virtual environment
python -m venv venv
# Activate the virtual environment
.\venv\Scripts\Activate.ps1
# Install the package in editable mode with development dependencies
pip install -e ".[dev]"The software depends on Python 3 and the following third-party packages:
numpy, scipy, matplotlib, findiff, and numdifftools.
All will be installed automatically when installing bice.
We have first tutorials!
- Heat equation tutorial: a simple tutorial on how to use bice to implement a first partial differential equation and perform a time simulation of it.
- Swift-Hohenberg equation tutorial: a simple tutorial on how to use bice's path continuation capabilities.
- Predator-prey model tutorial: an introduction into the continuation of periodic orbits.
More will follow soon.
Meanwhile you can check out the less documented demos.
Click here for the online version of the documentation.
The documentation can be generated locally with:
nox -s docsThe documentation can then be found in the folder docs.
You will need to have the development dependencies installed:
pip3 install -e ".[dev]"To ensure code quality, you can run the following commands locally:
# Using nox (recommended, handles its own environments)
nox -s lint
nox -s type_check
nox -s test
# Or manually in your active environment:
# Linting and formatting
ruff check .
ruff format .
# Type checking
mypy src/bice
# Tests
pytest tests/For more details, see CONTRIBUTING.md.