Skip to main content

A python library based on FEniCS that aims to solve problems in continuum mechanics, in particular cardiac mechanics

Project description

InstallConda CI Platform Binder status codecov pre-commit.ci status

pulse

A software for solving problems in cardiac mechanics.

Overview

pulse is a software based on FEniCS that aims to solve problems in cardiac mechanics (but is easily extended to solve more general problems in continuum mechanics). pulse is a results of the author's PhD thesis, where most of the relevant background for the code can be found.

While FEniCS offers a general framework for solving PDEs, pulse specifically targets problems in continuum mechanics. Therefore, most of the code for applying compatible boundary conditions, formulating the governing equations, choosing appropriate spaces for the solutions and applying iterative strategies etc. are already implemented, so that the user can focus on the actual problem he/she wants to solve rather than implementing all the necessary code for formulating and solving the underlying equations.

Installation instructions

Install with pip

pulse can be installed directly from PyPI

python3  -m pip install fenics-pulse

or you can install the most recent development version

python3 -m pip install git+https://github.com/finsberg/pulse.git

Install with conda

You can also install the package using conda

conda install -c conda-forge pulse

Docker

It is also possible to use Docker. There is a prebuilt docker image using FEniCS 2017.2, python3.6 and pulse. You can get it by typing

docker pull finsberg/pulse:latest

Requirements

  • FEniCS version 2016 or newer

Note that if you install FEniCS using anaconda then you will not get support for parallel HDF5 see e.g this issue.

Getting started

Check out the demos in the demo folder. These demos are currently in jupyter notebook format. If you want to run them as python files you can convert the notebooks to .py files using e.g jupytext

Automated test

Test are provided in the folder tests. You can run the test with pytest

python3 -m pytest tests -vv

Documentation

Documentation can be found at finsberg.github.io/pulse You can create documentation yourselves by typing make html in the root directory.

Citing

If you use pulse in your own research, please cite the JOSS paper

@article{pulse,
  doi = {10.21105/joss.01539},
  url = {https://doi.org/10.21105/joss.01539},
  year  = {2019},
  month = {sept},
  publisher = {The Open Journal},
  volume = {4},
  number = {41},
  pages = {1539},
  author = {Henrik Finsberg},
  title = {pulse: A python package based on FEniCS for solving problems in cardiac mechanics},
  journal = {The Journal of Open Source Software}
}

Known issues

  • If you encounter errors with h5py try to uninstall it (pip uninstall h5py) and then re-install it without installing any binary packages, i.e
python3 -m pip install h5py --no-binary=h5py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fenics_pulse-2021.1.1.tar.gz (12.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fenics_pulse-2021.1.1-py2.py3-none-any.whl (12.2 MB view details)

Uploaded Python 2Python 3

File details

Details for the file fenics_pulse-2021.1.1.tar.gz.

File metadata

  • Download URL: fenics_pulse-2021.1.1.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for fenics_pulse-2021.1.1.tar.gz
Algorithm Hash digest
SHA256 6114a97a78d9bd7f2b3d4211d35cab82e15e5d4443e02664428d5ee30aee8b2b
MD5 da0de414fd7b644cf9b4d5dbcfb6401a
BLAKE2b-256 af77efe4f6084995f5bacd4ee61a0bd3f3eb374d4cfcb4abab1101ed928f0731

See more details on using hashes here.

File details

Details for the file fenics_pulse-2021.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: fenics_pulse-2021.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.2 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for fenics_pulse-2021.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b4c7536e72a4f1c586db7f5902991ac1ad8b6975f36e083e93de362234c2c579
MD5 428058d7667aa0f7004503bebf134f03
BLAKE2b-256 9304ca9b97297135c809b3945dc2b2d9aa820886cd788afe3e145d609dc89396

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page