https://github.com/jorgensd/dolfinx-tutorial
A reimplementation of the Springer book: https://github.com/hplgit/fenics-tutorial/, covering new topics as well as transitioning from dolfin to dolfinx
https://github.com/jorgensd/dolfinx-tutorial
fenics fenicsx finite-element-methods tutorial
Last synced: 4 months ago
JSON representation
A reimplementation of the Springer book: https://github.com/hplgit/fenics-tutorial/, covering new topics as well as transitioning from dolfin to dolfinx
- Host: GitHub
- URL: https://github.com/jorgensd/dolfinx-tutorial
- Owner: jorgensd
- Created: 2020-11-28T14:05:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-12T14:11:19.000Z (9 months ago)
- Last Synced: 2024-08-12T16:12:36.568Z (9 months ago)
- Topics: fenics, fenicsx, finite-element-methods, tutorial
- Language: Jupyter Notebook
- Homepage: https://jorgensd.github.io/dolfinx-tutorial/
- Size: 409 MB
- Stars: 99
- Watchers: 5
- Forks: 57
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
Awesome Lists containing this project
README
# The DOLFINx tutorial
[](https://github.com/jorgensd/dolfinx-tutorial/actions/workflows/deploy.yml)
[](https://github.com/jorgensd/dolfinx-tutorial/actions/workflows/test_nightly.yml)Author: Jørgen S. Dokken
This is the source code for the dolfinx-tutorial [webpage](https://jorgensd.github.io/dolfinx-tutorial/).
If you have any comments, corrections or questions, please submit an issue in the issue tracker.## Contributing
If you want to contribute to this tutorial, please make a fork of the repository, make your changes, and test that the CI passes. You can do this locally by downloading [act](https://github.com/nektos/act) and call
```bash
act -j test-nightly
```Alternatively, if you want to add a separate chapter, a Jupyter notebook can be added to a pull request, without integrating it into the tutorial. If so, the notebook will be reviewed and modified to be included in the tutorial.
Any code added to the tutorial should work in parallel. If any changes are made to `ipynb` files, please ensure that these changes are reflected in the corresponding `py` files by using [`jupytext`](https://jupytext.readthedocs.io/en/latest/faq.html#can-i-use-jupytext-with-jupyterhub-binder-nteract-colab-saturn-or-azure):
```bash
python3 -m jupytext --sync */*.ipynb
```Any code added to the tutorial should work in parallel.
To strip notebook output, one can use pre-commit.
```bash
pre-commit run --all-files
```## Dependencies
It is adviced to use a pre-installed version of DOLFINx, for instance through conda or docker. Remaining dependencies can be installed with
```bash
python3 -m pip install --no-binary=h5py -e .
```# Docker images
Docker images for this tutorial can be found in the [packages tab](https://github.com/jorgensd/dolfinx-tutorial/pkgs/container/dolfinx-tutorial)
Additional requirements on top of the `dolfinx/lab:nightly` images can be found at [Dockerfile](docker/Dockerfile) and [pyproject.toml](./pyproject.toml)
##
An image building DOLFINx, Basix, UFL and FFCx from source can be built using:
```bash
docker build -f ./docker/Dockerfile -t local_lab_env .
```from the root of this repository, and run
```bash
docker run --rm -ti -v $(pwd):/root/shared -w /root/shared --init -p 8888:8888 local_lab_env
```from the main directory.