Building simulations for partial differential equations (PDEs) often requires specialized tools. The dealii library offers a robust and open-source C++ solution for finite element computations. This guide provides a clear roadmap for installing dealii, equipping you to tackle complex PDE problems efficiently.
Whether you’re a seasoned computational scientist or just starting your finite element journey, this post simplifies the installation process. We’ll cover the steps from downloading the library to configuring your system, ensuring a smooth integration with your development environment.
First, we download the latest version of dealii finite element framework from its github repository.
After downloading the library we extract the library content, for instance, if the name of the file is dealii-9.5.1.tar.gz
then we do the following
tar zxvf dealii-9.5.1.tar.gz
mv dealii-9.5.1 /opt/
Here we have moved the dealii-9.5.1
folder to the /opt/
path.
If you are using VMware, you should have enough ram (at least 8Gb for the virtual machine) to compile and build the library successfully.
For setting up the new VM environment (In the case you are using VMware), run the following commands
Ensure that the package index is updated: sudo apt-get update
.If the VM has a GUI (X11, and so on), install or upgrade open-vm-tools-desktop, sudo apt-get install open-vm-tools-desktop
. Otherwise, use the command to install open-vm-tools, sudo apt-get install open-vm-tools
Next we cd into the dealii-9.5.1 folder and the go inside the build folder
cd /opt/dealii-9.5.1/build
We run the following commands
cmake -DDEAL_II_DOXYGEN_USE_MATHJAX=ON -DDEAL_II_DOXYGEN_USE_ONLINE_MATHJAX=OFF -DDEAL_II_COMPONENT_DOCUMENTATION=ON -DCMAKE_INSTALL_PREFIX=/opt/deal.II ..
sudo make documentation
sudo make --jobs=4 install
sudo make test
Here we have not only built the library but also we have built the documentation with the option to use offline mathjax (if offline mathjax is not available, it automatically switches to use the online mathjax). Finally, we have built the tests packaged with the library.