Prerequisites
For this course, knowledge of the stress tensor, strong and weak forms of equations, function spaces, and familiarity with Python/Jupyter notebooks is recommended.
To follow along with the examples, you need to install Docker on your system. This setup requires Windows 10/11 Education or Professional. It does not work on Windows 10/11 Home.
You will also need:
- Docker
- ParaView
- Google Chrome
After installation, open Chrome and go to
chrome://flags/. Enable WebGL Developer Extensions.
Install FEniCSx
Once Docker is installed and running, open CMDER or a terminal and run:
docker pull iitrabhi/fenicsx_lab
Running
To start the JupyterLab server, use:
docker run -p 8888:8888 -v host_system_path:/root/codes/ -w /root/codes/ iitrabhi/fenicsx_lab
Replace host_system_path with the path to the folder that contains your code.
For example, if D:\Codes contains your code, run:
docker run -p 8888:8888 -v D:\Codes:/root/codes/ -w /root/codes/ iitrabhi/fenicsx_lab
Once the command starts, it will print a URL beginning with:
http://127.0.0.1:8888/lab
Open it in Chrome to access JupyterLab.
If you have Windows Home
You can use Google Colab to run FEniCSx on the cloud.
Open Google Colab, upload your notebook, and run:
try:
import dolfinx
except ImportError:
!wget "https://fem-on-colab.github.io/releases/fenicsx-install-release-real.sh" -O "/tmp/fenicsx-install.sh" && bash "/tmp/fenicsx-install.sh"
import dolfinx
Reference: https://fem-on-colab.github.io/packages.html