Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Poly-Spline Finite-Element Method

This repository contains the scripts to regenerate the figures in the paper:

Decoupling Simulation Accuracy from Mesh Quality

 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 Transactions on Graphics},
 month = {3},
 number = {3},
 pages = {19:1--19:16},
 publisher = {Association for Computing Machinery (ACM)},
 volume = {38},
 year = {2019},

CPP installation

First clone the polyfem repository:

git clone

and follow the instructions to compile it.

Note the examples in the paper use Padiso which requires a licence. It is free for academia or can be obtained trough MKL. This is however not necessary to reproduce the data.


You can then run the UI with


The default function in polyfem is the Franke function. For this work we used an old variation of it. To reproduce the data select FrankeOld from the problem dropdown. Problem selection

load the mesh and click the "run all" button.

To enable splines check the "spline" checkbox. Similarly you can use quadratic bases by increasing "discr" from 1 to 2. Spline checkbox

Command line

You can run the same experiment trough the command line. You need to create a JSON file with the configuration

    "mesh": <path to the mesh>,
    "discr_order": 1/2,
    "problem": "FrankeOld",
    "quadrature_order": 4,
    "scalar_formulation": "Laplacian",
    "solver_type": "Eigen::UmfPackLU",
    "use_spline": true/false,
    "n_refs": 1,
    "export": {
        "vis_mesh": "solution.vtu"

Note if you have Pardiso installed, remove "solver_type": "Eigen::UmfPackLU", from the JSON file to fallback to the default Pardiso solver.

then run Polyfem with

./PolyFEM_bin --json <path to the json> --cmd

You can then see the solution.vtu using Paraview.


We created a simple jupyter notebook with an example to generate Fig 13.

The problem FrankeOld is not yet available on the conda version of Polyfem. This however doesn't change how to use Polyfem, stay tuned for updates.


This notebook can be interactively run with binder! It is a free service and it is slow.


Local run

Install conda form or a minimal version miniconda. It is a python package manager.

Simple install

Create a conda environment directly from the environment file

conda env create -f environment.yml

then activate the new environment

conda activate polyspline

and launch the notebook

jupyter notebook

to run the examples. Here you can find a intro to jupyter notebooks.

Advanced install

Create an environnement

conda create -n polyspline

activate it

conda activate polyspline

and add conda forge to the package manager channels

conda config --add channels conda-forge

At this point you can install all packages

conda install numpy
conda install meshplot
conda install polyfempy
conda install plotly
conda install jupyter

and launch the notebook

jupyter notebook



All figures where generated with PolyFEM. Refer to the turorial and the JSON api for details.

Make sure that PARDISO is found and enabled, otherwise you might not be able to generate certain figures (see below). In PolyFEM, FindPardiso.cmake will look for the PARDISO library in ~/.local or ~/.pardiso. If you installed PARDISO in a different location, you may need to update this file accordingly.


As stated in the paper, we use PARDISO for the all figures.

If you use the python version (or don't have PARDISO), polyfem will fallback to the algebraic multigrid solver HYPRE.

If you try to generate the any figure with an iterative solver, running times may be exceedingly long, so it is not recommended.


The 2D mesh dataset can be found here, the 3D hybrid meshes can be found here, and the 3D pure hex here.

Smaller meshes used for the convergence plot can be downloaded here.


Replicability data for Poly-Spline Finite-Element Method








No releases published


No packages published