Framework for parallel simulations of EMI and KNP-EMI models in complex geometries.
- FEniCS (www.fenicsproject.org)
- multiphenics (https://github.com/multiphenics/multiphenics)
The easiest way to get started is to install FEniCS via Docker and then to install multiphenics and the EMIx package within the Docker container by following these steps.
To download and enter the EMIx source code
git clone git@github.com:pietrobe/EMIx.git
cd EMIx
We recommend using Docker (www.docker.com) to install and run FEniCS. EMIx relies on FEniCS (legacy), and has been tested most recently with the specific Docker image listed below. To install FEniCS
sudo docker run -t -v $(pwd):/home/fenics -i ghcr.io/scientificcomputing/fenics:2023-11-15
cd /home/fenics
The multiphenics package adds robust parallel multi-domain support to (legacy) FEniCS. To install multiphenics
pip install git+https://github.com/multiphenics/multiphenics.git
To install the EMIx package
pip install -e .
To test that all dependencies are operating successfully using a sample EMIx problem, run
cd examples
python3 EMI_example.py # Serial run
mpirun -n N python3 -u EMI_example.py # Parallel run, with N the number of MPI processors used
The expected results are terminal output from 100 time steps of solving the EMI equations and simulation results in a separate directory (named output). For the KNP-EMI case, run:
mpirun -n N python3 -u KNPEMI_example.py
Further informations in data/README.md and examples/data/README.md.
EMIx is developed by Pietro Benedusi in collaboration with Marie E. Rognes's group at Simula.
If you run into memory issues in the form of segmentation faults or out-of-memory errors, check the memory limits of your Docker container, which may be set lower than the available system memory.