Professional Documents
Culture Documents
1 Introduction
G ET F EM is a finite element library, freely distributed under the terms of the Gnu Lesser General Public
License (LGPL license, http://home.gna.org/getfem/). It aims at providing some standard tools for the
realisation of finite element codes, and in particular:
proposing a generic management of meshes: arbitrary dimension, arbitrary geometric trans-
formations;
providing some generic assembling methods;
implementing many advanced methods (mixed methods, mortar elements, hierarchical ele-
ments, X-FEM,...), and simplify the addition of new methods;
proposing a simple interface under Matlab and Python.
Mode of an oscillating structure (Paolo
View in cut of the tripod.
Bertolo).
2 The G ET F EM ++ toolbox
2.1 The kernel
5
At the bottom level are located the geometric transformations between the reference
5
5 Level-set and XFEM
3 4
element and the real element. The reference elements are build from simplices and
3
0
1 2 tensorial products of simplices.
0
1
3.2 Assembling
Building the final linear system from finite element methods. Some assembling methods are pro-
Stokes problem in 2D. The velocity is P2 and the pressure is discontinuous P1. Left: velocity modulus on
vided for several classical problems: linearized or large strain elasticity, Poisson, Stokes, bilaplacian,
the deformed mesh. Center: velocity (arrows) and pressure (colormap). Right: zoom of center.
linearized plate...
Generic methods: description (independant form the finite element used) of the tensorial opration to
make on each element. For instance, for Poisson problem, the assembling of the term
Z Z X
a(x)∇ψ p.∇ψ q dx = aj φj (∇ψ p)i(∇ψ q )i
X
T T j i
Stokes problem in 3D, in a cylindrical tank
is described by comp(Grad(#1).Grad(#1).Base(#2))(:,i,:,i,j).a(j). crossed by an incompressible fluid. The figure
represents the modulus of the velocity and sev-
eral flux lines
4 Matlab and Python interface
Some easy and widely documented interfaces for Matlab and Python are available (documentation is [2]).
access to all the functionalities of the toolbox;
allow to benefit from the graphical capabilities of Matlab for proposing a few functions of post-
treatment (visualisation of 2D and 3D solutions), for which the quality of the visualisation has been 100
strengthened (careful representation of the discontinuites and the degree of finite elements and geometric 10
transformations). 1
Below, an example of implementation with Matlab interface on a linear elasticity problem. A tripod, 0.1
whose mesh was built with GiD [4], is loaded verticaly. The calculations were done in isoparametric P2. 0.01
L−infinity error
PK(2,1)
0.001
The colormap represents the Von Mises criteria on the surface of the deformed geometry. PK(2,2)
0.0001
gf_workspace(’clear all’);
m=gf_mesh(’import’,’gid’,’tripod.GiD.msh’); 1e−05
PK(2,3)
mfu=gf_mesh_fem(m,3); % mesh-fem supporting a 3D-vector field
PK(2,15)
mfd=gf_mesh_fem(m,1); % scalar mesh˙fem 1e−06 PK(2,4)