Sapphire (mnemonically: Simulations automatically programmed with Firedrake) is an engine for constructing PDE-based simulations discretized in space with mixed finite elements and in time with finite differences.
Examples
Details from the following examples were published in a journal article.
Melting gallium
Freezing water
Melting octadecane
Setup
Firedrake
Activate the Firedrake virtual environment with something like
. ~/firedrake/bin/activate
Sapphire
Download with
git clone [email protected]:geo-fluid-dynamics/sapphire.git
The following assumes that the Firedrake virtual environment is already activated.
Test with
python3 -m pytest sapphire/tests/
Install with
cd sapphire
python3 setup.py install
Development
Guidelines
Mostly we try to follow PEP proposed guidelines, e.g. The Zen of Python (PEP 20), and do not ever from firedrake import *
(PEP 8).
This package structure mostly follows that suggested by The Hitchhiker's Guide to Python.