Author: Jørgen S. Dokken
This library contains an add-on to FEniCSx enabling the possibilities of enforce multi-point constraints, such as
where
This can be used to for instance enforce slip conditions strongly.
Consider a linear system of the form
We then solve the system
If we include boundary conditions on the form
The library performs custom matrix and vector assembly adding the extra constraints to the set of linear equations. All assemblies are local to the process, and no MPI communication except when setting up the multi point constraints.
These assemblers are written in C++, but have equivalent Python assemblers in the optional dolfinx_mpc.numba
module.
Documentation at https://jorgensd.github.io/dolfinx_mpc
The DOLFINx MPC package is now on Conda. The C++ library can be found under libdolfinx_mpc and the Python library under dolfinx_mpc. If you have any issues with these installations, add an issue at dolfinx_mpc feedstock.
Version 0.7.0 is available as an docker image at Github Packages and can be ran using
docker run -ti -v $(pwd):/root/shared -w /root/shared ghcr.io/jorgensd/dolfinx_mpc:v0.7.0
To change to complex mode run source dolfinx-complex-mode
.
Similarly, to change back to real mode, call source dolfinx-real-mode
.
To install the latest version (main branch), you need to install the latest release of DOLFINx.
Easiest way to install DOLFINx is to use docker. The DOLFINx docker images goes under the name dolfinx/dolfinx.
Remember to use an appropriate tag to get the correct version of DOLFINx, i.e. (:nightly
or :vx.y.z
).
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