load "msh3"

// Parameters
int nn = 20; // Mesh quality

// Mesh
int[int] labs = [1, 2, 2, 1, 1, 2]; // Label numbering
mesh3 Th = cube(nn, nn, nn, label=labs);
// Remove the ]0.5,1[^3 domain of the cube
Th = trunc(Th, (x < 0.5) | (y < 0.5) | (z < 0.5), label=1);

// Fespace
fespace Vh(Th, P1);
Vh u, v;

// Macro
macro Grad(u) [dx(u), dy(u), dz(u)] //

// Define the weak form and solve
solve Poisson(u, v, solver=CG)
    = int3d(Th)(
          Grad(u)' * Grad(v)
          1 * v
    + on(1, u=0)

// Plot
plot(u, nbiso=15);

A high level multiphysics finite element software

FreeFEM offers a fast interpolation algorithm and a language for the manipulation of data on multiple meshes.

Easy to use PDE solver

FreeFEM is a popular 2D and 3D partial differential equations (PDE) solver used by thousands of researchers across the world. It allows you to easily implement your own physics modules using the provided FreeFEM language. FreeFEM offers a large list of finite elements, like the Lagrange, Taylor-Hood, etc., usable in the continuous and discontinuous Galerkin method framework.

Numerous physics are pre-built :

  • Incompressible Navier-Stokes (using the P1-P2 Taylor Hood element)
  • Lamé equations (linear elasticity)
  • Neo-Hookean, Mooney-Rivlin (nonlinear elasticity)
  • Thermal diffusion
  • Thermal convection
  • Thermal radiation
  • Magnetostatics
  • Electrostatics
  • Fluid-structure interaction (FSI)

Strong mesh and parallel capabilities

FreeFEM has it own internal mesher, called BAMG, and is compatible with the best open-source mesh and visualization software like Tetgen, Gmsh, Mmg and ParaView. Written in C++ to optimize for speed, FreeFEM is interfaced with the popular mumps, PETSc and HPDDM solvers.

Latest Articles

June 11, 2019 | Gonçalo Mendonça, Frederico Afonso, Fernando Lau

Model order reduction in aerodynamics: Review and applications

The need of the aerospace industry, at national or European level, of faster yet reliable computational fluid dynamics models is the main drive for the application of model reduction techniques. This need is linked to the time cost of high-fidelity models, rendering them inefficient for applications like multi-disciplinary optimization. With the goal of testing and applying model reduction to computational fluid dynamics models applicable to lifting surfaces, a bibliographical research covering reduction of nonlinear, dynamic, or steady models was conducted. This established the prevalence of projection and least mean squares methods, which rely on solutions of the original high-fidelity model and their proper orthogonal decomposition to work. Other complementary techniques such as adaptive sampling, greedy sampling, and hybrid models are also presented and discussed. These projection and least mean squares methods are then tested on simple and documented benchmarks to estimate the error and speed-up of the reduced order models thus generated. Dynamic, steady, nonlinear, and multiparametric problems were reduced, with the simplest version of these methods showing the most promise. These methods were later applied to single parameter problems, namely the lid-driven cavity with incompressible Navier–Stokes equations and varying Reynolds number, and the elliptic airfoil at varying angles of attack for compressible Euler flow. An analysis of the performance of these methods is given at the end of this article, highlighting the computational speed-up obtained with these techniques, and the challenges presented by multiparametric problems and problems showing point singularities in their domain.

June 07, 2019 | Hussam Al Daas, Laura Grigori, Pierre Jolivet, Pierre-Henri Tournier

A Multilevel Schwarz Preconditioner Based on a Hierarchy of Robust Coarse Spaces

In this paper we present a multilevel preconditioner based on overlapping Schwarz methods for symmetric positive definite (SPD) matrices. Robust two-level Schwarz preconditioners exist in the literature to guarantee fast convergence of Krylov methods. As long as the dimension of the coarse space is reasonable, that is, exact solvers can be used efficiently, two-level methods scale well on parallel architectures. However, the factorization of the coarse space matrix may become costly at scale. An alternative is then to use an iterative method on the second level, combined with an algebraic preconditioner, such as a one-level additive Schwarz preconditioner. Nevertheless, the condition number of the resulting preconditioned coarse space matrix may still be large. One of the difficulties of using more advanced methods, like algebraic multigrid or even two-level overlapping Schwarz methods, to solve the coarse problem is that the matrix does not arise from a partial differential equation (PDE) anymore. We introduce in this paper a robust multilevel additive Schwarz preconditioner where at each level the condition number is bounded, ensuring a fast convergence for each nested solver. Furthermore, our construction does not require any additional information than for building a two-level method, and may thus be seen as an algebraic extension.

May 30, 2019 | Shayan Shamipour, Roland Kardos, Shi-Lei Xue, Björn Hof, Edouard Hannezo, Carl-Philipp Heisenberg

Bulk Actin Dynamics Drive Phase Segregation in Zebrafish Oocytes

Segregation of maternal determinants within the oocyte constitutes the first step in embryo patterning. In zebrafish oocytes, extensive ooplasmic streaming leads to the segregation of ooplasm from yolk granules along the animal-vegetal axis of the oocyte. Here, we show that this process does not rely on cortical actin reorganization, as previously thought, but instead on a cell-cycle-dependent bulk actin polymerization wave traveling from the animal to the vegetal pole of the oocyte. This wave functions in segregation by both pulling ooplasm animally and pushing yolk granules vegetally. Using biophysical experimentation and theory, we show that ooplasm pulling is mediated by bulk actin network flows exerting friction forces on the ooplasm, while yolk granule pushing is achieved by a mechanism closely resembling actin comet formation on yolk granules. Our study defines a novel role of cell-cycle-controlled bulk actin polymerization waves in oocyte polarization via ooplasmic segregation.


21-23 MAY 2019

HPCSE 2019 - Ostrava, Czech Republic

High Performance Computing in Science and Engineering

3-5 JUNE 2019

COUPLED 2019 - Sitges (Barcelona)

Brain imaging with FreeFEM.

19-21 JUNE 2019

Rencontre Mathématiques de Rouen

Introduction to FreeFEM version 4

You are in good company

Sorbonne université INRIA ANR Genci CNRS