This is the home of maniFEM, a C++ library for generating meshes and solving partial differential equations through the finite element method. The name comes from "finite elements on manifolds". ManiFEM was designed with the goal of coping with very general meshes, in particular meshes on Riemannian manifolds, including quotient manifolds like the flat torus. Although most constructors build two- or three-dimensional meshes, the internal implementation of cells and meshes allows for any topological dimension. ManiFEM was written with the goal of being conceptually clear and easy to read. We hope it will prove particularly useful for people who want a fine control over the mesh, e.g. for implementing their own meshing or remeshing algorithms.
ManiFEM is just a collection of C++ classes. It has no user-friendly interface nor graphic capabilities. The user should have some understanding of programming and of C++. However, maniFEM can be used at a basic level by people with no deep knowledge of C++. Have a look at the gallery. Similar products (competitors), as well as strong and weak points of maniFEM, are listed in the manual, at the end of section 1.
In its current version,
release 25.02,
maniFEM works well for mesh generation, including meshes on quotient manifolds.
The user can control variations in the element size; anisotropic meshes can also be built.
Lagrange finite elements of degree one and two are implemented for triangular and quadrangular cells;
Lagrange finite elements of degree one are implemented for tetrahedral and hexahedral cells;
many other types of finite elements are still to be implemented.
Variational formulations are implemented as C++ objects; they allow for compact and elegant code.
A changelog is included at the end of the
manual, just before the index.
To check which version of maniFEM is installed in your computer, see at the beginning of the file
maniFEM.h
.
ManiFEM is written by Cristian Barbarosie and Anca-Maria Toader; see also the list of contributors and the colophon.
To learn maniFEM, you should read the manual (version 25.02). Older versions of the manual : first edition (ISBN 978-972-8394-30-1), second edition (ISBN 978-972-8394-34-9).
To use maniFEM, you should
choose a release, download and unpack the source code to some directory in your computer.
Current code
may be unstable, releases are stable.
You can then run the examples in the manual :
just make
run-parag-1.1
for the example in paragraph 1.1,
make
run-parag-2.16
for the example in paragraph 2.16, and so on.
You will need a recent C++ compiler (we use g++
from the
GNU Compiler Collection) and the make
utility.
Under linux it should be easy to install them.
It is not that easy to install and use them under Windows, but it is certainly possible,
for instance by using cygwin.
You may want to use gmsh for visualization purposes.
Finite element computations are disabled by default in maniFEM.
To enable finite element computations you must comment out (or delete) the line containing
-DMANIFEM_NO_FEM
in the Makefile
.
You must also install the Eigen library;
just copy its source tree somewhere in your computer and assign that path to a variable named
EIGEN_DIR
in the Makefile
.
Paragraphs 12.14 and 12.15 in the
manual
give more details.
This work is supported by national funding from FCT - Fundação para a Ciência e a Tecnologia (Portugal), through Faculdade de Ciências da Universidade de Lisboa and Centro de Matemática, Aplicações Fundamentais e Investigação Operacional, project UIDB/04561/2020.
Copyright 2019 - 2025 Cristian Barbarosie
ManiFEM is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ManiFEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Full text of the GNU Lesser General Public License is available at https://www.gnu.org/licenses/
Cristian Barbarosie is Assistant Professor at Faculdade de Ciências da Universidade de Lisboa, where this web page is hosted.