Skip to main content
QUICK REVIEW

[Paper Review] FreeFem++, a tool to solve PDEs numerically

Georges Sadaka|arXiv (Cornell University)|May 7, 2012
Advanced Numerical Methods in Computational MathematicsEngineering1 references6 citations
TL;DR

FreeFem++ is an open-source, user-friendly finite element software for numerically solving partial differential equations (PDEs) using variational formulations. It supports 2D and 3D problems, automatic mesh generation with anisotropic adaptation, and a wide range of finite elements—including discontinuous and mixed elements—enabling efficient solution of linear and nonlinear elliptic, parabolic, and hyperbolic PDEs via a high-level scripting language and built-in solvers like UMFPACK and GMRES.

ABSTRACT

FreeFem++ is an open source platform to solve partial differential equations numerically, based on finite element methods. It was developed at the Laboratoire Jacques-Louis Lions, Universit\\'e Pierre et Marie Curie, Paris by Fr\\'ed\\'eric Hecht in collaboration with Olivier Pironneau, Jacques Morice, Antoine Le Hyaric and Kohji Ohtsuka. The FreeFem++ platform has been developed to facilitate teaching and basic research through prototyping. FreeFem++ has an advanced automatic mesh generator, capable of a posteriori mesh adaptation; it has a general purpose elliptic solver interfaced with fast algorithms such as the multi-frontal method UMFPACK, SuperLU . Hyperbolic and parabolic problems are solved by iterative algorithms prescribed by the user with the high level language of FreeFem++. It has several triangular finite elements, including discontinuous elements. For the moment this platform is restricted to the numerical simulations of problems which admit a variational formulation. We will give in the sequel an introduction to FreeFem++ which include the basic of this software. You may find more information throw this link http://www.freefem.org/ff++.

Motivation & Objective

  • To provide an accessible, open-source tool for numerical PDE solving tailored for teaching and prototyping in scientific computing.
  • To enable researchers and students to rapidly implement and test finite element methods without low-level coding.
  • To support complex PDE systems with variational formulations, including nonlinear and time-dependent problems.
  • To integrate advanced numerical features such as adaptive meshing, mass matrix lumping, and efficient sparse solvers.
  • To facilitate numerical experimentation for model validation, mathematical analysis, and algorithm development in PDEs.

Proposed method

  • Uses a high-level scripting language to define PDEs via their variational forms, closely resembling mathematical notation.
  • Employs an automatic Delaunay-Voronoi-based mesh generator with a posteriori anisotropic adaptation for improved accuracy.
  • Supports multiple finite element types, including continuous and discontinuous Lagrangian elements (P1, P2, P1dc, P2dc) and Raviart-Thomas elements.
  • Integrates fast sparse solvers such as UMFPACK, SuperLU, CG, and GMRES for efficient linear system solution.
  • Enables time integration via user-defined iterative schemes, including the θ-scheme for parabolic problems with stability analysis.
  • Provides tools for mesh-to-mesh interpolation, error estimation, and visualization via gnuplot and other external tools.

Experimental results

Research questions

  • RQ1How can a high-level, open-source platform streamline the numerical solution of PDEs for researchers and educators?
  • RQ2What is the convergence behavior of the θ-scheme in space and time when applied to the heat equation using FreeFem++?
  • RQ3How effective is the automatic mesh adaptation and mass lumping in improving stability and efficiency for time-dependent PDEs?
  • RQ4To what extent can FreeFem++ support complex PDE systems with nonlinear and coupled terms through variational formulations?
  • RQ5What is the accuracy and robustness of FreeFem++ in solving benchmark problems like the Poisson equation and nonlinear elliptic equations?

Key findings

  • The θ-scheme in FreeFem++ achieves second-order convergence in space and first-order in time when θ = 0 (explicit) or θ = 1 (backward Euler), and second-order in both space and time when θ = 0.5 (Crank-Nicolson).
  • For θ ∈ [0, 0.5), the θ-scheme is stable under the CFL condition Δt ≤ CFL·(Δx)²/(4μ·(1−2θ)), with numerical tests confirming convergence rates close to 1.0 for time and 2.0 for space when Δx = Δy.
  • When using mass lumping via qf1pTlump, the mass matrix becomes diagonal and easily invertible, improving computational efficiency and extending the CFL condition for explicit schemes.
  • Numerical results for the heat equation show convergence rates of approximately 1.99992 in space and 0.99996 in time for θ = 0, confirming theoretical expectations.
  • For θ = 1/2, the method achieves space convergence rates of 2.00195 and time convergence rates of 2.00195, indicating second-order accuracy in both dimensions.
  • The software successfully reproduces exact solutions with high accuracy, as demonstrated by L² errors decreasing proportionally with mesh refinement and time step reduction.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.