This package provides convenience tools that help with the implementation of
See phifem-env.yml.
⚠️ Note that all these dependencies (exceptphifem) are already included indolfinxDocker container.
- Given the
pixi.lockfile in the source directory, create and run aphifemPixi environment via:pixi shell
- Create a
phifemConda environment from the spec filephifem-env.yml:conda create -f phifem-env.yml
- Activate the
phifemenvironment:conda activate phifem
The phiFEM package can be used inside the dolfinx container (e.g. ghcr.io/fenics/dolfinx/dolfinx:stable)
- Launch the
dolfinxcontainer in interactive mode using, e.g. Docker (see the docker documentation for the meaning of the different arguments):docker run -ti -v $(pwd):/home/dolfinx/shared -w /home/dolfinx/shared dolfinx/dolfinx:stable - Inside the container install
phiFEMvia pip:pip install phifem
See here.
The demos can be found on the phiFEM Github repository. To run the demos first clone the repository.
Inside the Docker container/Conda environment:
-
Install the demos dependencies:
XXX install polars Pyaml
with
XXX=pipin the Docker container andXXX=condain the conda environment. -
Navigate the demo directory and run it e.g.:
cd demo/weak-dirichlet/flower python main.py bg
⚠️ The demo files require arguments, for more info runpython main.py -h.
Inside the Docker container/Conda environment:
-
Install
pytest:XXX install pytest
with
XXX=pipin the Docker container andXXX=condain the Conda environment. -
Run the tests:
cd tests pytest
The author Raphaël Bulle guarantees that his contributions to this project are generative-ai-free.
For more information, see here (in french).
phiFEM is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with phiFEM. If not, see http://www.gnu.org/licenses/.
Frédérique Lecourtier (https://mimesis.inria.fr/members/frederique-lecourtier/)
Footnotes
-
M. DUPREZ and A. LOZINSKI, $\varphi$-FEM: A finite element method on domains defined by level-sets, SIAM J. Numer. Anal., 58 (2020), pp. 1008-1028, https://epubs.siam.org/doi/10.1137/19m1248947 ↩
-
S. COTIN, M. DUPREZ, V. LLERAS, A. LOZINSKI, and K. VUILLEMOT, $\varphi$-FEM: An efficient simulation tool using simple meshes for problems in structure mechanics and heat transfer, Partition of Unity Methods, (2023), pp. 191-216, https://www.semanticscholar.org/paper/%CF%86-FEM%3A-an-efficient-simulation-tool-using-simple-in-Cotin-Duprez/82f2015ac98f66af115ae57f020b0b1a45c46ad0. ↩

