Skip to content

PolyFEM

A polyvalent C++ and Python FEM library.

Logo

PolyFEM is a simple C++ and Python finite element library. We provide a wide set of common PDEs including:

  • Laplace
  • Helmholtz
  • Linear Elasticity
  • Saint-Venant Elasticity
  • Neo-Hookean Elasticity
  • Stokes

PolyFEM simplicity lies on the interface: just pick a problem, select some boundary condition, and solve. No need to construct complicated function spaces, or learn a new scripting language: everything is set-up trough a JSON interface or trough the Setting class in python.

For instance, PolyFEM seamlessly integrates quad/hexes and tri/tets of order up to 4, and integrate state-of-the-art techniques such as the adaptive p-refinement presented in “Decoupling Simulation Accuracy from Mesh Quality” or the spline and polygonal bases in “Poly-Spline Finite-Element Method”.

The library is actively used in our research so expect frequent updates, fixes, and new features!

News

  • Bindings v0.5.2 with a new more pythonic interface, support for function in the right-hand side and exact solution
  • PolyFEM is being used in biology! Check the paper or the project page!
  • PolyFEM meshplot, igl and wildmeshing are presented at a SIGGRAPH course (07/30/2019)
  • PolyFEM is now triangle and tetgen free. Stay tuned for the release of v0.5 in python with a new interface to high-order meshes and meshplot for the fast 3D plots!
  • PolyFEM as been used in “A Large Scale Comparison of Tetrahedral and Hexahedral Elements for Finite Element Analysis”! Check the interactive plots!
  • PolyFEM now support high-order geometric maps! Check the SIGGRAPH paper “TriWild: Robust Triangulation with Curve Constraints” for more details!
  • PolyFEM has a python interface!
  • PolyFEM can do adaptive a priori p-refinement! Check the SIGGRAPH paper “Decoupling Simulation Accuracy from Mesh Quality” for more details!

C++

Build Status Build status

For more details refer to the C++ section

Compilation

All the C++ dependencies required to build the code are included. It should work on Windows, macOS and Linux, and it should build out of the box with CMake:

mkdir build
cd build
cmake ..
make -j4

On Linux zenity is required for the file dialog window to work. On macOS and Windows the native windows are used directly.

Usage

The main executable, ./PolyFEM_bin, can be called with a GUI or through a command-line interface. Simply run:

./PolyFEM_bin

Python

Last update Downloads Install Binder

For more details refer to the Python section

Installation

I am making efforts to provide a simple python interface to Polyfem.

For doing so I am maintaining a conda package which can be easily installed https://anaconda.org/conda-forge/polyfempy.

conda install -c conda-forge polyfempy

Usage

Simply import the package!

import polyfempy

Citation

If you use PolyFEM in your project, please consider citing our work:

@misc{polyfem,
  author = {Teseo Schneider and Jérémie Dumas and Xifeng Gao and Denis Zorin and Daniele Panozzo},
  title = {{Polyfem}},
  howpublished = "\url{https://polyfem.github.io/}",
  year = {2019},
}
@article{Schneider:2019:PFM,
  author = {Schneider, Teseo and Dumas, J{\'e}r{\'e}mie and Gao, Xifeng and Botsch, Mario and Panozzo, Daniele and Zorin, Denis},
  title = {Poly-Spline Finite-Element Method},
  journal = {ACM Trans. Graph.},
  volume = {38},
  number = {3},
  month = mar,
  year = {2019},
  url = {http://doi.acm.org/10.1145/3313797},
  publisher = {ACM}
}
@article{Schneider:2018:DSA,
    author = {Teseo Schneider and Yixin Hu and Jérémie Dumas and Xifeng Gao and Daniele Panozzo and Denis Zorin},
    journal = {ACM Transactions on Graphics},
    link = {},
    month = {10},
    number = {6},
    publisher = {Association for Computing Machinery (ACM)},
    title = {Decoupling Simulation Accuracy from Mesh Quality},
    volume = {37},
    year = {2018}
}

Acknowledgements & Funding

The software is being developed in the Geometric Computing Lab at NYU Courant Institute of Mathematical Sciences

This work was partially supported by:

  • the NSF CAREER award 1652515
  • the NSF grant IIS-1320635
  • the NSF grant DMS-1436591
  • the NSF grant 1835712
  • the SNSF grant P2TIP2_175859
  • Adobe Research
  • nTopology

License

The code of PolyFEM itself is licensed under MIT License. However, please be mindful of third-party libraries which are used by PolyFEM, and may be available under a different license.