Additional material for SSCP L12 Lecture - FEniCS(x) introduction
This repository provides FEniCSx code for the examples used in the L12 lecture introducing the Finite Element Method and FEniCS(x). These scripts can be run within an environment or container with FEniCSx installed :
Conda can be installed through miniconda. The environment to be used for running the example scripts can be created and activated with the following commands:
conda env create environment.yml
conda activate fenicsx_sscp_2025
The environment can be deactivated with:
conda deactivate
Docker can be installed in various ways as shown in the Docker documentation. Docker also provides a convenience script.
The stable FEniCSx Docker container can be run using the following command.
Note : the option -v is used to share the current directory ($pwd) of the host machine with the Docker container. Therefore, we recommand to run the command within the SSCP_L12_FEniCSx directory to give the Docker container access to the example scripts.
docker run -it --name sscp_2025 -v $(pwd):/home/shared -w /home/shared dolfinx/dolfinx:stable
The scripts require the installation of additional dependencies that can be installed with pip:
pip install pyvista