FEEL++ : a library to solve partial differential equations in 1D, 2D and 3D using h/p Galerkin Methods

This software was developed (or is under development) within the higher education and research community. Its stability can vary (see fields below) and its working state is not guaranteed.
Higher Edu - Research dev card
  • Creation or important update: 02/07/09
  • Minor correction: 07/09/11
  • Index card author: Christophe Prud'homme (Laboratoire Jean Kuntzmann)
  • Theme leader: Violaine Louvet (Institut Camille Jordan)
General software features

General Description

FEEL++ (Finite Element Embedded Library in C++) is a C++ library for partial differential equation solves using generalized Galerkin methods i.e. fem, hp/fem, spectral methods. The main features are:

  • handles 1D, 2D and 3D geometries
  • supports various geometric entities: simplices and hypercubes
  • supports various polynomial sets:
    • Lagrange (continuous,discontinuous,all dimensions,all interpolation point sets)
    • Dubiner (discontinuous), boundary adapted(continuous)
    • Legendre(discontinuous), boundary adapted(continuous)
  • provides functional mathematical concepts : operators, function spaces, elements of function spaces...
  • supports continuous and discontinuous Galerkin methods
  • provides a DSEL in C++ called FEEL++ for variational formulations, integration and projection



1. Computing $\int_\Omega x^2+y^2+z^2$ :

* Compute \int f where f= x^2 + y^2 + z^2 with a quadrature that integrates exactely second order polynomials
double local_intf = integrate( elements(mesh), _Q<2>(), Px()*Px() + Py()*Py() + Pz()*Pz() ).evaluate()(0,0);

2. Assembling the laplacian using either weak or strong handling of Dirichlet boundary conditions

space_ptrtype Xh = space_type::New( mesh );
element_type u( Xh, "u" );
element_type v( Xh, "v" );
sparse_matrix_ptrtype D( M_backend->newMatrix( Xh, Xh ) );
form2( Xh, Xh, D, _init=true ) = integrate( elements(mesh), _Q<2*(Order-1)>(),
nu*gradt(u)*trans(grad(v)) );
// weak Dirichlet (Nitsche formulation)
form2( Xh, Xh, D ) +=
integrate( markedfaces(mesh,1), _Q<2*Order>(),
-(gradt(u)*N())*id(v) -(grad(v)*N())*idt(u) +penaldir*id(v)*idt(u)/hFace()) +
integrate( markedfaces(mesh,3), _Q<2*Order>(),
-(gradt(u)*N())*id(v) -(grad(v)*N())*idt(u) +penaldir*id(v)*idt(u)/hFace());




  • Boost >= 1.37
  • Mpi (optional)
  • Petsc >= 2.3.3 (optional)
  • Trilinos (optional)


Pre-Processing formats

  • GAMBIT neutral
  • Gmsh

Post-processing supported formats

  • EnSight (use then ensight and/or paraview for visualisation)
  • Gmsh
Context in which the software is used

Distributions to which Life is integrated to

Plateforms :

All machines UNIX/Linux 32 ou 64b, MacOS X and Windows(cygwin)

Related software

Free software for parallel scientific visualisation

Free software for CAO and mesh generation

Publications related to software


Publications about FEEL++

ICIAM Mini Symposium on modern scientific computing

We present a brief overview of Life, a unified framework for finite element and spectral element methods in 1D, 2D and 3D in C++. First, we describe some basic principles, then we focus on the two cornerstones of the library, he polynomial library and FEEL++, a \cpp embedded language designed for partial differential equations. The applications range is potentially quite large; at the moment Life is essentially used for the developement of new numerical methods and the exhaustive comparisons between standard ones e.g. high order methods, stabilisation methods.

author = {Christophe Prud'homme},
title = {Life: A modern and unified C++ implementation of finite-element and spectral-elements methods in 1D, 2D and 3D: overview and applications},
booktitle = {ICIAM},
year = {2007},
note = {accepted}

Para'06 article: an overview (10 pages) of Life

This article presents an overview of a unified framework for finite element and spectral element methods in 1D, 2D and 3D in C++ called Life. The objectives of this framework are quite ambitious and could be expressed in various ways:
(i) the creation of a versatile mathematical kernel allowing for solving easily problems using different techniques thus allowing testing and comparing methods, e.g. cG versus dG,
(ii) the creation of a small and manageable library which shall nevertheless encompass a wide range of numerical methods and techniques and
(iii) build mathematical software that follows closely the mathematical abstractions associated with the partial differential equations solved.

author = {Christophe Prud'homme},
title = {Life: Overview of a Unified C++ Implementation of the Finite and Spectral Element Methods in 1D, 2D and 3D},
booktitle = {Workshop On State-Of-The-Art In Scientific And Parallel Computing},
year = {2006},
series = {Lecture Notes in Computer Science},
pages = {10},
month = {dec},
publisher = {Springer-Verlag},

The paper on Life DSEL for variational formulations

In this article, we present a domain specific embedded language in C++ that can be used in various contexts such as numerical projection onto a functional space, numerical integration, variational formulations and automatic differentiation. Albeit these tools operate in different ways, the language overcomes this difficulty by decoupling
expression constructions from evaluation. The language is implemented using expression templates and meta-programming techniques and uses various Boost libraries. The language is exercised on a number of
non-trivial examples and a benchmark presents the performance behavior on a few test problems.

author = {Christophe Prud'homme},
title = {A domain specific embedded language in C++ for automatic differentiation, projection, integration and variational formulations},
journal = {Scientific Programming},
year = {2006},
volume = {14},
pages = {81-110},
number = {2},
url = {\url{http://iospress.metapress.com/link.asp?id=8xwd8r59hg1hmlcl}}

Publications using Life

Life and Fluid Structure Interaction

Accuracy is critical if we are to trust simulation predictions. In settings such as fluid-structure interaction it is all the more important to obtain reliable results to understand, for example, the impact of pathologies on blood flows in the cardio-vascular system. In this paper, we propose a computational strategy for simulating fluid structure interaction using high order methods in space and time.

First, we present the mathematical and computational core framework, Life, underlying our multi-physics solvers. Life is a versatile library allowing for 1D, 2D and 3D partial differential solves using h/p type Galerkin methods, continuous as well as discontinuous, in sequential and parallel settings. Then, we briefly describe the handling of high order geometry and the structure solver. Next we outline the high-order space-time approximation of the incompressible Navier-Stokes equations with an emphasis on the algebraic system and the preconditioning strategies. Numerical results are displayed to show the optimality of the preconditioner with respect to the discretization order in the Stokes case. Finally, we present the high-order rbitrary Lagrangian Eulerian (ALE) framework in which we solve the fluid-structure interaction problem as well as some initial results.

author = {Gon\c {c}alo {P}ena and {C}hristophe {P}rud'homme},
title = {Construction of a High Order Fluid-Structure Interaction Solver},
year = {2008},
pages = {10},
note = {Accepted}

B. Stamm Phd. Thesis

author = {Stamm, Benjamin},
title = {Stabilization strategies for discontinuous {G}alerkin methods},
year = {2008},
address = {Lausanne},
affiliation = {EPFL},
details = {http://infoscience.epfl.ch/record/124839},
oai-id = {oai:infoscience.epfl.ch:thesis-4135},
oai-set = {thesis},
publisher = {EPFL},
status = {SUBMITTED},
thesis-note = {Thèse Ecole polytechnique fédérale de Lausanne EPFL, no 4135 (2008), Faculté des sciences de base SB, Programme doctoral Mathématiques, Institut d'analyse et calcul scientifique IACS (Chaire de modélisation et calcul scientifique CMCS). Dir.: Alfio Quarteroni, Erik Burman},
unit = {CMCS},
url = {http://library.epfl.ch/theses/?nr=4135}

C. Winkelmann Phd. Thesis

In the present work, we investigate mathematical and numerical aspects of interior penalty finite element methods for free surface flows. We consider the incompressible Navier-Stokes equations with variable density and viscosity, combined with a front capturing model using the level set method. We formulate interior penalty finite
element methods for both the Navier-Stokes equations and the level set advection equation. For the two-fluid Stokes equations, we propose and analyze an unfitted finite element scheme with interior penalty.
Optimal a priori error estimates for the velocity and the pressure are proved in the energy norm. A preconditioning strategy with adaptive reuse of incomplete factorizations as preconditioners for Krylov subspace methods is introduced and applied for solving the linear systems. Different and complementary solutions for reducing the matrix assembly time and the memory consumption are proposed and tested, each of which is applicable in general in the context of either multiphase flow or interior penalty stabilization. As level set reinitialization method, we apply a combination of the interface local projection and a fast marching scheme. We provide for the latter a reformulation of the distance computation algorithm on unstructured simplicial meshes in any spatial dimension, allowing for both an efficient implementation and geometric insight. We present and discuss numerical solutions of reference problems for the one-fluid Navier-Stokes equations and for the level set advection problem. Solutions of benchmark problems in two and three dimensions involving one or two fluids are then approximated, and the results are compared to literature values. Finally, we describe software design techniques and abstractions for the efficient and general implementation of the applied methods.

author = {Winkelmann, Christoph},
title = {Interior penalty finite element approximation of {N}avier-{S}tokes equations and application to free surface flows},
year = {2007},
address = {Lausanne},
affiliation = {EPFL},
details = {http://infoscience.epfl.ch/record/112720},
documenturl = {http://library.epfl.ch/theses/?nr=3971},
keywords = {Navier-Stokes equations; free surface; finite elements; interior penalty stabilization; unfitted elements; front capturing; level set method;
reinitialization; preconditioning},
oai-id = {oai:infoscience.epfl.ch:thesis-3971},
oai-set = {thesis; thesis:fulltext; fulltext},
pagecount = {147 p.},
publisher = {EPFL},
status = {PUBLISHED},
thesis-note = {Thèse sciences Ecole polytechnique fédérale de Lausanne EPFL, no 3971 (2007), Faculté des sciences de base SB, Section de mathématiques, Programme doctoral Mathématiques, Institut d'analyse et calcul scientifique IACS (Chaire de modélisation et calcul scientifique CMCS). Dir.: Alfio Quarteroni},
unit = {CMCS},
url = {http://library.epfl.ch/theses/?nr=3971}