FreeFem (also referred to as FreeFEM or FreeFem++) is a free, open-source programming language and software platform for solving partial differential equations (PDEs) using the finite element method (FEM). It is developed and maintained by Sorbonne Université (formerly Université Pierre et Marie Curie) and the Laboratoire Jacques-Louis Lions (LJLL) in Paris.
Overview
FreeFem is a domain-specific language (DSL) designed to allow researchers and engineers to define and solve PDE problems in 1D, 2D, and 3D domains with relatively concise code. It supports nonlinear, multiphysics, and time-dependent problems, and includes built-in interfaces for mesh generation, finite element assembly, and linear/nonlinear solvers.
The software is written in C++ and is distributed under the GNU Lesser General Public License (LGPL) version 2.1 or later. It runs on Linux, macOS, Microsoft Windows, and Solaris.
History
- 1987: The first version, named MacFem, was created by Olivier Pironneau and ran only on Macintosh. A version called PCFem appeared later. Both were written in Pascal.
- 1992: The software was rewritten in C++ and renamed FreeFem.
- 1996: A new version, FreeFem+, was released.
- 1998: FreeFem++ was introduced, which became the primary version for many years.
- 2019: The project was rebranded as FreeFEM (version 4), with the official website at freefem.org and source code hosted on GitHub.
- 2024 (December 6): Stable release 4.15.
Features
- Finite element library: Supports a wide range of finite elements, including Lagrange (P1, P2, P3), Taylor-Hood, and discontinuous Galerkin (DG) elements.
- Mesh generation: Includes an internal mesh generator called BAMG (Bidimensional Anisotropic Mesh Generator) and is compatible with external tools such as TetGen, Gmsh, and Mmg.
- Solver interfaces: Interfaced with high-performance linear solvers including PETSc, MUMPS, and HPDDM.
- Multiphisics capabilities: Pre-built physics modules include incompressible Navier-Stokes, linear and nonlinear elasticity (Neo-Hookean, Mooney-Rivlin), thermal diffusion/convection/radiation, magnetostatics, electrostatics, and fluid-structure interaction (FSI).
- Parallel computing: Supports distributed-memory parallelism via MPI.
- Visualization: Compatible with ParaView and other visualization tools.
Language
The FreeFem language is inspired by C++ syntax. Users write script files that define the mesh, function spaces, variational formulations (weak forms), boundary conditions, and solver parameters. The language includes built-in operators for differentiation, integration, and interpolation across multiple meshes.
Applications
FreeFem is used by thousands of researchers worldwide in fields such as:
- Computational fluid dynamics (CFD)
- Solid mechanics and structural analysis
- Heat transfer and thermal management
- Electromagnetics
- Fluid-structure interaction
- Optimization and inverse problems
- Image processing and inpainting
Related Versions
- FreeFem++ (version 3.x): The predecessor to FreeFEM v4, still widely referenced in literature.
- FreeFem3D: A separate version focused on 3D problems.
- FreeFem++-cs: An IDE (integrated development environment) for FreeFem++.
References
- Hecht, Frédéric (2012). "New development in FreeFem++". Journal of Numerical Mathematics. 20 (3–4): 251–266. doi:10.1515/jnum-2012-0013.
- Official website: https://freefem.org/
- Documentation: https://doc.freefem.org/
- Source code repository: https://github.com/FreeFem/FreeFem-sources