DOLFINx first¶
simcardemsx is built on DOLFINx, which is not installable from PyPI on its own. The simplest way to get it is the official container image:
docker run -ti -v $(pwd):/home/shared -w /home/shared ghcr.io/fenics/dolfinx/dolfinx:stableDOLFINx is also available from conda-forge (conda install -c conda-forge fenics-dolfinx)
and Spack. See the DOLFINx installation
instructions.
simcardemsx assumes that dolfinx, mpi4py, petsc4py, basix and ufl are already installed, and that they are recent enough for the versions of fenicsx-pulse and fenicsx-beat it requires.
simcardemsx¶
From PyPI:
python3 -m pip install simcardemsxFrom source:
git clone https://github.com/ComputationalPhysiology/simcardemsx.git
cd simcardemsx
python3 -m pip install -e .One dependency, scifem, is compiled against the DOLFINx you have. If pip fails to build it, install its build requirements and build it without isolation first:
python3 -m pip install --group build
python3 -m pip install scifem --no-build-isolationExtras¶
| Extra | What it adds |
|---|---|
demo | What the examples need: matplotlib, cardiac-geometriesx, the circulation model, and the mesh and fibre generators of the BiV example |
test | pytest, and what the tests read |
docs | MyST and jupytext, to build this site |
dev | pre-commit, mypy and the type stubs |
all | All of the above |
python3 -m pip install "simcardemsx[demo]"The development container¶
The repository has a dev container in .devcontainer/, built on
the DOLFINx image, which installs everything (pip install -e .[all]). VS Code and GitHub
Codespaces open the repository in it directly.
Checking the installation¶
python3 -c "import simcardemsx; print(simcardemsx.__version__)"
python3 -m pytest -m "not slow" # from a source checkout, with the test extra