I am not finding a way to install dolfinx_mpc in linux. The github page has no linux method provided.
Hi.
There is two ways of installing dolfinx_mpc in Linux. One is to use the proper docker container:
docker run -ti -v $(pwd):/root/shared -w /root/shared ghcr.io/jorgensd/dolfinx_mpc:vx.y.z
where vx.y.z
corresponds to a fixed version (v0.7.0, v0.7.2, v0.8.0, etc)
Another approach is to install along an existing dolfinx
installation by downloading the corresponding dolfinx_mpc
version (see https://github.com/jorgensd/dolfinx_mpc). For example, if you have an existing v0.7.2
dolfinx version, then you need to download the corresponding v0.7.2
version of dolfinx_mpc
https://github.com/jorgensd/dolfinx_mpc/archive/refs/tags/v0.7.2.zip, followed by the install instructions:
To install the dolfinx_mpc-library run the following code from this directory:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build-dir cpp/
ninja -j3 install -C build-dir
python3 -m pip -v install --config-settings=cmake.build-type="Release" --no-build-isolation ./python -U
If the installation fails, there may be some missing packages and compilers on your system.
Cheers.
The simplest way to use fenics on ubuntu is via the native deb packages provided by the FEniCS PPA, see GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment
Assuming you have other components already installed, dolfinx_mpc is installed with
sudo apt install python3-dolfinx-mpc