The goal of MFEM is to enable high-performance scalable finite element discretization research and application development on a wide variety of platforms, ranging from laptops to supercomputers.

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:

Additional support for automated adaptive analysis and parallel unstructured modifications on simplex meshes is provided via integration with the PUMI distributed mesh management system.

Parallel, Scalable and GPU-ready

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. As of version 4.0, GPU acceleration of several examples and many linear algebra and finite element operations is available.

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 PETSc, SLEPc, SUNDIALS, PUMI, Ginkgo and HiOp.

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:

In addition, the sources for several external benchmark/proxy-apps build on top of MFEM are available:

A handful of "toy" miniapps of less serious nature demonstrate the flexibility of MFEM (and provide a bit of fun):

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.

Another visualization tool natively supported by MFEM is ParaView. The file format supports high-order (up to order six) meshes and elements.

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 BSD license.