https://gitlab.inria.fr/mosaic/bvpy/badges/develop/coverage.svg https://gitlab.inria.fr/mosaic/bvpy/badges/master/pipeline.svg https://anaconda.org/mosaic/bvpy/badges/platforms.svg https://img.shields.io/conda/vn/conda-forge/bvpy.svg https://anaconda.org/mosaic/bvpy/badges/license.svg https://anaconda.org/conda-forge/bvpy/badges/latest_release_date.svg https://anaconda.org/conda-forge/bvpy/badges/downloads.svg

Welcome

https://joss.theoj.org/papers/10.21105/joss.02831/status.svg

Bvpy is a python library, based on FEniCS and GMSH, to easily implement and study numerically Boundary Value Problems (BVPs) as well as Initial Boundary Value Problems (IBVPs) through the Finite Element Method (FEM).

Initially built up in the context of developmental biology and morphomechanics, Bvpy proposes an intuitive API as close as possible to the formal definition of BVPs. Its purpose is to enable users to quickly and efficiently estimate the behavior of a wide variety of fields (scalars, vectors, tensors) on biologically relevant structures (Riemannian and non-Rieamannian manifolds), inspired by biophysical and biochemical processes (morphogene patterning, active matter mechanics, diffusion-reaction processes, active transports…).

Despite this biological motivation, the Bvpy library has been implemented in an agnostic manner that makes it suitable for many other scientific context.

Documentation

The documentation can be found here.

A quick introduction to boundary-value problems and Initial-Boundary-value problems, as well as a the general philosophy behind the Bvpy library development can be found here.

A detailed description of the main classes and models of the library can be found here.

Some tutorials explaining basic manipulations are gathered here.

Requirements

  • Python 3.9

  • FEniCS 2019.1.0

  • GMSH 4.11

Installation

You will need conda in order to install bvpy, you can download it here.

  • From sources:

git clone https://gitlab.inria.fr/mosaic/bvpy.git
cd bvpy
conda create -n bvpy-dev -c conda-forge "python=3.9" "fenics=2019.1.0"
conda activate bvpy-dev
python -m pip install -e .
  • From anaconda:

conda install -c mosaic bvpy

Important Note: Bvpy is currently running on FEniCS legacy and not FEniCSx. If you are using an ARM-based computer (mac M1s, M2s), there is currently no ARM-Friendly conda package of FEniCS legacy. But you can still run x86-based packages. to do so type the following:

CONDA_SUBDIR=osx-64 conda create -n bvpy_x86
conda activate bvpy_x86
conda config --env --set subdir osx-64

Once this is done, you can import manually all the required libraries, listed within the conda/env_osx.yaml configuration file.

  • From docker

docker pull registry.gitlab.inria.fr/mosaic/bvpy:<TAG>

Where <TAG> is the version of bvpy you want. You can find all the available version on the repository.

To run the docker container and launch jupyter use:

docker run -it -p 8888:8888 registry.gitlab.inria.fr/mosaic/bvpy:<TAG>
jupyter notebook --ip 0.0.0.0 --no-browser --allow-root --port 8888

And use the URL on the terminal to open the tutorials.

Test

If you install bvpy from sources install pytest and pytest-cov inside your environment:

python -m pip install -e ".[test]"

And then run at the root of the project:

pytest -v --cov=bvpy test/

Support

If you encounter an error or need help, please raise an issue.

Contributing

Bvpy is a is a collaborative project and contributions are welcome. If you want to contribute, please contact the coordinator prior to any merge request and check the gitlab merge request guidelines if needed.

Citation

If you are using Bvpy in a published work, please use this bibtex entry as reference:

@article{Gacon2021,
doi = {10.21105/joss.02831},
url = {https://doi.org/10.21105/joss.02831},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {59},
pages = {2831},
author = {Florian Gacon and Christophe Godin and Olivier Ali},
title = {BVPy: A FEniCS-based Python package to ease the expression and study of boundary value problems in Biology.},
journal = {Journal of Open Source Software}}