Welcome to the oomph-lib homepage

oomph-lib is an object-oriented, open-source finite-element library for the simulation of multi-physics problems. It is developed and maintained by Matthias Heil and Andrew Hazel of the School of Mathematics at The University of Manchester, along with many other contributors.

See the change log page for an overview of the changes made since the previous release.

What is it [and what is it not]?

oomph-lib is:
  • an object-oriented, open-source finite-element library for the simulation of multi-physics problems.
oomph-lib is not:
  • a GUI-based, mouse-driven "package".
You must write your own C++ driver codes to specify your problem, using oomph-lib's high-level objects. Once the problem is formulated, the main function can be as simple as this:
main()
{
// Create the problem object
MyProblem problem;
// Solve the problem, using oomph-lib's default Newton solver
problem.newton_solve();
}
oomph-lib provides the state of the art infrastructure for the problem formulation and solution. The library contains a large number of elements, meshes, timesteppers, solvers, etc. which can be combined to solve any problem.

The library is supplied with extensive on-line documentation which includes:

  • Theory: Finite Elements -- from procedural to object-oriented

    This provides a relatively brief, constructive "top-down" introduction to the maths of the finite element method, and explains its object-oriented implementation in oomph-lib.
  • The Data Structure

    A bottom-up discussion of oomph-lib's overall data structure, including a complete, cross-referenced index of all oomph-lib's classes (generated by Doxygen).
  • (Not-So-)Quick Guide

    The (Not-So-)Quick Guide provides a "quick" introduction on how to create new instances of oomph-lib's fundamental objects: Problems, Meshes, and Elements.
  • Example Codes/Tutorials

    We provide a large number of verified and documented example problems.
    • The example problems are arranged in order of increasing complexity and can be used as chapters in a self-study course. Comments and exercises are provided to encourage further exploration of oomph-lib's capabilities.
    • The individual examples are as self-contained as possible and can be used as quick guides to particular features of oomph-lib. ("How do I solve time-dependent problems?"; "How do I enable spatial adaptivity?"; "How do I write my own meshes?"; etc.)
    • The examples codes should be regarded as templates for your own driver codes: Examine the list of examples and try to find one that resembles the problem that you wish to solve. For most "classical" problems (e.g. the solution of the Navier-Stokes equations with standard boundary conditions), very few modifications are required (e.g. adjusting the mesh to a different domain, changing the boundary and/or initial conditions, etc). If you wish to solve a non-standard problem, or one for which oomph-lib does not (yet) provide elements or meshes, it is easy to write your own, following the detailed instructions provided in the documentation.

Features

  • Large number of fully-developed and carefully-validated element types for the solution of:
    • The Poisson equation
    • The unsteady heat equation
    • The linear wave equation
    • The advection-diffusion equation
    • The Navier-Stokes equations, incl. free-surfaces, in Cartesian and axisymmetric co-ordinates.
    • The equations of large-displacement solid mechanics, based on the principle of virtual displacements in cartesian and axisymmetric geometries; with arbitrary constitutive equations.
    • Shell and beam elements, based on a geometrically non-linear formulation.
    • ...and many others.
    [Note: Most elements are implemented in a dimension-independent formulation]
  • It is easy to formulate new elements for problems that are not included in the above list.
  • It is easy to combine any of the above elements to "multi-physics" elements, allowing e.g.
    • the solution of fluid-structure interaction problems
    • the simulation of unsteady heat conduction in an elastic body that undergoes large displacements
    • free-surface problems
    • etc.
  • Parallel processing capabilities.
  • Full spatial and temporal adaptivity. All elements listed above support quad-tree/octree-based mesh refinement procedures and adaptive timestepping.
  • A wide range of meshes; new meshes can easily be added to the library. oomph-lib can also use meshes that are generated by third-party (commercial) mesh generators.
  • The ability to solve problems in domains with time-dependent, curvilinear boundaries.
  • oomph-lib treats all problems as non-linear problems and uses Newton's method as the default non-linear solver. Within this framework, linear problems are special cases for which the Newton iteration converges in one step. The linear systems arising during the Newton iteration can be solved with a variety of direct and iterative solvers. Continuation methods (Keller's arclength method and displacement-control for solid mechanics problems) are implemented.
  • A large number of fully documented example codes. All examples include an introduction to the mathematical/physical problem, a detailed discussion of the driver code, a discussion of the results (incl. comparisons against analytical solutions where appropriate) and exercises and comments.
  • The library has extensive self-test facilities. It can be compiled with a PARANOID flag switched on or off. If the flag is set during compilation, the code performs a large number of self-tests during its execution. If things go wrong, code execution terminates gracefully and diagnostic output is generated to help pinpoint the problem. Of course, the tests introduce an additional run-time overhead, so can be switched off in production runs. During development, range checking on all array-based objects, (vectors, matrices, tensors, etc) can be enabled separately by using the RANGE_CHECKING flag, but introduces considerable run-time overhead.

How do I get/install the code?

Downloads

oomph-lib is hosted on and distributed via GitHub at

https://github.com/oomph-lib/oomph-lib.

For more information on how to download and install the library see the installation guide.

Prerequisites

oomph-lib has been/is primarily being developed in Linux so it is well tested there. However several people successfully run it on Windows and Mac OS X. Our continuous integration on GitHub currently checks Linux and Mac OS X builds. In order to minimise the dependence on external libraries we include "frozen" versions of certain external libraries (METIS, SuperLU, ...) with our distribution. The idea is that you should only have to unpack, build and install one distribution to produce the fully compiled library, the html-based documentation and working example codes.

For this purpose you must have:
  • A computer with a linux (or unix) operating system. [Note for windows users: We believe that oomph-lib can be installed in a windows environment, using cygwin, though we haven't tried this for a long time.]
  • Compilers for C++, C and Fortran77. The open-source GNU gcc compiler suite version 9.3.0. or later is fine. [ Note: The Fortran77 and C compilers are only required to compile some external libraries -- oomph-lib itself is written entirely in C++. We assume that your C++ compiler can handle the C++11 standard. If it doesn't you may have to add the -std=c++11 option to the CXXFLAGS during the configure stage.]
The following programs are helpful but not essential:
  • GNU's autoconf, automake and libtool are required if you wish to add additional features to your local copy of oomph-lib; see the oomph-lib download page for more details.
  • python3 is needed to analyse the results of the extensive self-tests that may be performed at the end of the installation to verify that the build process was completed successfully. If python3 is not available, the self-test will compile and run all test codes but it will not be possible to verify the correctness of the results.
  • doxygen is needed to build a local copy of oomph-lib's extensive online documentation. If doxygen is not installed on your system you can consult the latest version of the online documentation on the oomph-lib homepage.
The oomph-lib distribution is built under autoconf / automake control, making the installation completely straightforward. We provide two main installation mechanisms:
  • oomph-lib can be built/installed/tested with GNU's standard configure; make; make install; make check procedure.
  • We also provide a customised build script, autogen.sh, that guides the "non-expert" user through the installation. The script facilitates the specification of various build options, such as optimisation levels etc.
Subject to the minimum requirements, listed above, you should be able to install and use our libraries "anywhere". However, as anybody who has ever ported any code to a different platform knows, things are rarely that simple -- even with autoconf, automake and libtool... Having said that, we have successfully installed and tested our installation on the following platforms:
  • Ubuntu (version 16.04) with gcc compilers (version 5.4.0). The tests included the MPI part of the library, which we compiled with OpenMPI (version 1.10.2).
  • ...

Preparing a ubuntu box for oomph-lib

Typically, when we install oomph-lib on a machine with a new (default) installation of ubuntu, we install at least the following additional packages (here listed with full apt-get syntax, so you can cut and paste):

apt-get install git
apt-get install make
apt-get install automake
apt-get install libtool
apt-get install libtool-bin
apt-get install cmake
apt-get install python2
apt-get install autoconf
apt-get install doxygen
apt-get install gfortran
apt-get install g++

Building the pdf version of the tutorials also requires a comprehensive latex installation:

apt-get install texlive texlive-latex-extra texlive-font-utils

If you want it all in one go (particularly useful if you have to prefix the apt-get with sudo):

apt-get install git make automake libtool libtool-bin cmake python2 autoconf doxygen gfortran g++ texlive texlive-latex-extra texlive-font-utils

How do I get started?

oomph-lib contains a lot of code and a lot of documentation. How to get started obviously depends on your background: Are you familiar with the finite element method? How good is your knowledge of C++? Etc. Here are some possible "routemaps" around the library:
  • You are familiar with the finite element method and have a fairly good knowledge of C++
    • Have a look through the list of example codes to get a feeling for oomph-lib's capabilities. Pick a problem that interests you and study the associated tutorial. Copy the driver code into your own directory and play with it.
    • Once you have played with a few example codes, you may wish to to learn more about oomph-lib's overall data structure, or find out how to optimise the library for your particular application.
  • You have never used finite element methods but have a fairly good knowledge of C++
    • Study the "Top Down" introduction. This document includes a "low tech" overview of the mathematical/theoretical background and contrasts procedural implementations of the finite element method with the object-oriented approach adopted in oomph-lib.
    • Consult the (Not-So-)Quick-Guide to learn how to construct basic oomph-lib objects for your problem: Problems, Meshes, FiniteElements, etc.
    • Continue with the steps suggested above.
  • You have never used finite element methods and are a newcomer to C++
    • Buy Daoqi Yang brilliant book C++ and Object-Oriented Numeric Computing for Scientists and Engineers. Read it! Pretty much everything in this book is relevant for some parts of oomph-lib. You should at least understand:
      • The procedural aspects of C++ (basic types, functions and control structures).
      • Namespaces.
      • Classes (private, protected and public members; inheritance and multiple inheritance; virtual and pure virtual functions; base classes and derived classes; static and dynamic casts).
      • Templates and template instantiations.
      • The standard template library (STL).
    • Continue with the steps suggested above.



PDF file

A pdf version of this document is available.