Further Steps

30 minutes advanced


  Lesson Objectives

  Explore additional examples and miniapps.
  Write a simple simulation by extending existing examples.
  Learn more about MFEM and join the community.

  Note


  Explore additional examples and miniapps

MFEM includes a number of well-documented example codes and miniapps that can be used as tutorials, as well as simple starting points for user applications.

These examples and miniapps are available in the mfem/examples and mfem/miniapps subdirectories of your VS Code terminal.

The full list of examples is below. Feel free to explore any of them depending on your interests, but we recommend starting with the ones marked with a ⭐.

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

Many 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 built on top of MFEM are available:

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


  Write a simple simulation

Modify the miniapps and example codes to create a simple simulation of your own. You can edit the source code and rebuild the binary simply with make.

For example, you can solve a steady-state heat conduction problem in 2D and 3D using the shaper miniapp (modified for the cable shape) to define the mesh and ex1 or ex1p to solve it (modified to include separate coefficients for air and cable).

Please consult the MFEM code documentation and don't hesitate to ask if you have any implementation questions.

  We want to see your creativity!

Post your visualization images in the Slack channel for a chance to be featured on MFEM's gallery page!

  Install MFEM + GLVis on your own machine

Download MFEM from mfem.org/download or clone it from GitHub and follow the building instructions here: mfem.org/building.

You should be able to download and install the serial version in 10 minutes. The parallel version of MFEM requires installing hypre and METIS (see the building instructions).

Alternatively, if you already have Spack, you can build with spack install mfem glvis.

With your own installation, you can explore additional topics not covered in this tutorial such as:


  Visit the MFEM website

For more information about MFEM, visit the website, mfem.org, including the

Review the Videos for recordings from MFEM seminars, workshops, and conference presentations:

YouTube

YouTube

You may also be interested in visiting the websites of the related GLVis, CEED, and BLAST projects.


  Join the community

If MFEM looks exciting to you, please join the community on GitHub and help us make it better! 🚀

We welcome contributions and feedback at all levels: bugfixes; code improvements; simplifications; new mesh, discretization, or solver capabilities; improved documentation; new examples and miniapps; HPC performance improvements; etc. See CONTRIBUTING.md for more details.

You can contact the MFEM team by posting to the GitHub issue tracker or at mfem-dev@llnl.gov.


  Thank you!

Thank you for participating in the MFEM tutorial. Please let us know if you have any questions in the Slack channel.

Back to the MFEM tutorial page