Features

The goal of MFEM is to enable research and development of scalable finite element discretization and solver algorithms through general finite element abstractions, accurate and flexible visualization, and tight integration with the hypre library.

Conceptually, MFEM can be viewed as a finite element toolbox that provides the building blocks for developing finite element algorithms in a manner similar to that of MATLAB for linear algebra methods.

Higher-order Finite Element Spaces

H(curl) and H(div) spaces

MFEM supports a wide variety of finite element spaces in 2D and 3D, including arbitrary high-order:

Many bilinear and linear forms defined on these spaces, as well as linear operators such as gradient, curl and embedding between these spaces, are available in the code.

Flexible Discretization

In addition to classical Galerkin methods, MFEM enables the quick prototyping of

Wide Range of Mesh Types

MFEM supports arbitrary element transformations and includes classes for dealing with:

Parallel and Scalable

MFEM supports MPI-based parallelism throughout the library, and can readily be used as a scalable unstructured finite element problem generator.

A serial MFEM application typically requires minimal changes to transition to a scalable parallel version of the code, where it can take advantage of the integrated scalable linear solvers from the hypre library. Both of these versions can be further transitioned to high-performing templated variants, where operator assembly/evaluation is fully inlined for particular runtime parameters.

Built-in Solvers

MFEM is commonly used as a "finite element to linear algebra translator", since it can take a problem described in terms of finite element-type objects, and produce the corresponding linear algebra vectors and sparse matrices.

Several matrix storage formats are available including dense, compressed sparse row (CSR) and parallel compressed sparse row (ParCSR). Block vectors, operators and matrices are also supported.

A variety of solvers are available for the resulting linear algebra systems (or semi-discrete time-integration problems):

Extensive Examples

MFEM includes a number of well-documented example codes that can be used as tutorials, as well as simple starting points for user applications. Some of the included example codes are:

Most of the examples have a serial and a parallel version, illustrating the ease of transition and the minimal code changes between the two.

Many of the examples also have modifications that take advantage of optional third-party libraries such as the PETSc and SUNDIALS suites.

Beyond the examples, a number of miniapps are available that are more representative of the advanced usage of the library in physics/application codes. Some of the included miniapps are:

Accurate and Flexible Visualization

The general (high-order) meshes and finite element functions in MFEM can be visualized accurately using the companion OpenGL visualization tool GLVis, which is built on top of MFEM.

The VisIt visualization and analysis tool also natively supports MFEM formats.

Lightweight, Portable and Easily Extendable

The MFEM code base is relatively small and is written in highly portable C++ (e.g. with very limited use of templates and the STL).

The object-oriented design of MFEM separates the mesh, finite element and linear algebra abstractions, making it easy to extend the library and adapt it to a variety of applications.

Open Source

MFEM is an open-source software, and can be freely used under the terms of the LGPL 2.1 license.