Skip to main content

phiFEM: convenience tools to use the phiFEM immersed boundary finite element method with dolfinx.

Project description

phiFEM: a convenience package for using φ-FEM with FEniCSx

This package provides convenience tools that help with the implementation of φ-FEM schemes in the FEniCSx computation platform.

φ-FEM (or phiFEM) is an immersed boundary finite element method leveraging levelset functions to avoid the use of any non-standard finite element spaces or non-standard quadrature rules near the boundary of the domain. More information about φ-FEM can be found in the various publications (see e.g. [^1] and [^2]).

[^1]: M. DUPREZ and A. LOZINSKI, $\phi$-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
[^2]: S. COTIN, M. DUPREZ, V. LLERAS, A. LOZINSKI, and K. VUILLEMOT, $\phi$-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,

Prerequisites

Usage

We recommend to use phiFEM inside the dolfinx container (e.g. ghcr.io/fenics/dolfinx/dolfinx:stable).

  • Launch the dolfinx container 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 the phiFEM package with pip:
    pip install phifem
    

Run the demos

The demos can be found on the phiFEM Github repository. To run the demos you'll need to clone the repository and build and launch the container:

  1. Clone the phiFEM repository:
git clone https://github.com/PhiFEM/phiFEM.git
  1. Build the container (you might need sudo privileges):
cd phifem/docker
bash build_image.sh
  1. Run the container (you might need sudo privileges):
cd ../
bash run_image.sh
  1. Inside the container navigate the demo directory and e.g. run the interface elasticity demo:
cd demo/interface-elasticity
python main param1

Run the tests

To run the tests, follow the steps 1 to 3 to run the demos and inside the container:

cd tests
pytest

License

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/.

Authors (alphabetical)

Raphaël Bulle (https://rbulle.github.io)
Michel Duprez (https://michelduprez.fr/)
Killian Vuillemot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phifem-0.4.5.tar.gz (17.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phifem-0.4.5-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file phifem-0.4.5.tar.gz.

File metadata

  • Download URL: phifem-0.4.5.tar.gz
  • Upload date:
  • Size: 17.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for phifem-0.4.5.tar.gz
Algorithm Hash digest
SHA256 447b892c88e568d58c57398b7889210731bf482de5a5df32b2c3e081d852e6b0
MD5 961e7d5c6a4820eb795181417c9584e9
BLAKE2b-256 275b2ed7116edfbc211b5db215b3b069f5401e2114777eb5a88e7dbc02f92b03

See more details on using hashes here.

File details

Details for the file phifem-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: phifem-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for phifem-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a9006bc49ad762876cbe77552ae39b67b68ce7fc9fafcd089127e4ccb5dded5b
MD5 6023c843151ff0cc9d73ca39df5ccf8f
BLAKE2b-256 aea43e07e3099af2975b5346d0e92b3b9f3ee5792cae12e23bf5c4ab8325617e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page