int nn = 20; // Mesh quality
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 Vh(Th, P1);
Vh u, v;
macro Grad(u) [dx(u), dy(u), dz(u)] //
// Define the weak form and solve
solve Poisson(u, v, solver=CG)
Grad(u)' * Grad(v)
1 * v
+ on(1, u=0)
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.
- 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
- 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.
HPC in the cloud integration
With Qarnot's HPC platform, 7 lines of python code is all you need to run a FreeFEM simulation in the cloud. Learn how to run FreeFEM with Qarnot's sustainable HPC platform on Qarnot's blog.
FreeFEM is also available on Rescale's ScaleX® Pro. Rescale offers academic users up to 500 core hours on their HPC cloud.
Thanks to Mojtaba Barzegari
February 03, 2021 | Ying Sheng, Tie Zhang, Zixing Pan
In this paper we consider the stable P1 – P1 finite element pair solving the Stokes eigenvalue problem and derive some superconvergence results based on the interpolation post-processing technique. Firstly, we derive the superclose property of the interpolation function. Then a superconvergence result of O(h^3/2)-order for the pressure approximation and the velocity gradient approximation under the condition of strong regular mesh triangulation are obtained. Finally, the superconvergence rate of O(h^3)-order is proved for the eigenvalue approximation and the numerical experiment is provided to confirm the theoretical analysis.
January 30, 2021 | E. Fernández-Cara, J. Límaco, I. Marín-Gayte
This paper is devoted to the theoretical and numerical analysis of the null controllability of a quasi-linear parabolic equation. First, we establish a local controllability result. The proof relies on an appropriate inverse function argument. Then, we formulate an iterative algorithm for the computation of the null control and we prove a convergence result. Finally, we illustrate the analysis with some numerical experiments.
January 29, 2021 | Juan Wen, Pengzhan Huang, Ya-Ling He
In this paper, we first propose a new stabilized finite element method for the Stokes eigenvalue problem. This new method is based on multiscale enrichment, and is derived from the Stokes eigenvalue problem itself. The convergence of this new stabilized method is proved and the optimal priori error estimates for the eigenfunctions and eigenvalues are also obtained. Moreover, we combine this new stabilized finite element method with the two-level method to give a new two-level stabilized finite element method for the Stokes eigenvalue problem. Furthermore, we have proved a priori error estimates for this new two-level stabilized method. Finally, numerical examples confirm our theoretical analysis and validate the high effectiveness of the new methods.