# External Packages

`libMesh`

interfaces to a number of high-quality software packages to provide certain functionality. This page provides a list of packages and a description of their use in the library.
## Parallel Programming Paradigms

## MPI

The Message Passing Interface is a standard for parallel programming using the message passing model. PETSc and Trilinos require MPI for distributed-memory parallel functionality.`libMesh`

can make use of MPI for certain operations on
distributed-memory (as well as shared-memory and hybrid) parallel
computers, enabling its `DistributedMesh`

distributed-memory, fully unstructured mesh implementation.
`libMesh`

currently only supports MPI implementations
compatible with the MPI-2 and later MPI standards.
## TBB

Since February 2008`libMesh`

can be configured to use the Threading Building Blocks for thread-based parallelism on shared memory machines. Several key algorithms in the library have been refactored to be multithreaded, and this effort will continue as additional profiling reveals additional serial bottlenecks. It is envisioned that for certain classes of problems multilevel parallelism (e.g. message passing between nodes and threading within nodes) will prove more scalable than message passing alone, especially with the introduction of commodity multi-core processors. The reality is that for implicit problems this can only be achieved with a parallel linear algebra library that also uses multilevel parallelism.
## Numerics

### PETSc

The Portable, Extensible Toolkit for Scientific Computation (PETSc) is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations.### SLEPc

The Scalable Library for Eigenvalue Computations (SLEPc) is a library for the solution of large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc and can be used for either standard or generalized eigenproblems, with real or complex arithmetic.### BLAS

The Basic Linear Algebra Subprograms are routines that provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector and vector-vector operations, the Level 2 BLAS perform matrix-vector operations, and the Level 3 BLAS perform matrix-matrix operations. High-performance implementations of the BLAS are generally provided by computer hardware manufacturers for a particular architecture. PETSc makes extensive use of the BLAS hence a high-performance BLAS implementation is key to achieving high performance from the PETSc linear solvers.### LAPACK

LAPACK is written in Fortran77 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. The associated matrix factorizations (LU, Cholesky, QR, SVD, Schur, generalized Schur) are also provided, as are related computations such as reordering of the Schur factorizations and estimating condition numbers. Dense and banded matrices are handled, but not general sparse matrices. PETSc makes use of LAPACK in several computational kernels within its linear solver framework.### Trilinos

The Trilinos Project is an effort to develop and implement robust algorithms and enabling technologies using modern object-oriented software design, while still leveraging the value of established libraries. It emphasizes abstract interfaces for maximum flexibility of component interchanging, and provides a full-featured set of concrete classes that implement all abstract interfaces. Current development efforts will permit`libMesh`

can use the Epetra parallel matrix and vector data structures, as well as the AztecOO parallel linear solvers.
### LASPack

LASPack is an object-oriented package of iterative methods, multigrid solvers, and auxiliary routines for the iterative solution of linear systems. It does not run in parallel. There are data structures for vectors, general and square matrices, and preconditioners; a large number of accessing and manipulating these objects is available. LASPack's license is not compatible with the LGPL, and therefore LASPack support is only available if the user configures libmesh with the`--disable-strict-lgpl`

flag.
## Mesh Generation and File Formats

### Triangle

Triangle is the definitive two-dimensional Delaunay triangulation code written by Jonathan Richard Shewchuk.`libMesh`

can use Triangle to produce Delaunay triangulizations for hybrid-element (not just triangles) input meshes.
### Tetgen

Tetgen generates the Delaunay tetrahedralization, Voronoi diagram, constrained Delaunay tetrahedralizations and quality tetrahedral meshes. The main goal of TetGen is to generate suitable meshes for solving partial differential equations by finite element or finite volume methods.### ExodusII

ExodusII, available via github, is a model developed to store and retrieve data for finite element analyses. It is used for preprocessing (problem definition), postprocessing (results visualization), as well as code to code data transfer. An EXODUS II data file is a random access, machine independent, binary file that is written and read via C, C++, or Fortran library routines which comprise the Application Programming Interface.`libMesh`

contains source code for the EXODUS II library in `./contrib/exodusii`

and can use it to read EXODUS II mesh files. Additional information may be found on the Sandia Engineering Analysis Code Access System
### Tecplot

Tecplot is a high-quality engineering and scientific visualization package.`libMesh`

can write simulation data in either ASCII or binary formatted Tecplot files.
### GMV

The General Mesh Viewer is "an easy to use, 3D scientific visualization tool designed to view simulation data from any type of structured or unstructured mesh." GMV is developed at Los Alamos National Laboratory and is freely available for a wide range of platforms.`libMesh`

can write simulation data directly in the GMV file format.
## Utilities

### XDR

The XDR: External Data Representation Standard is a standard for the description and encoding of data. It is useful for transferring data between different computer architectures, and as such provides a very simple, portable approach for writing platform independent binary files.`libMesh`

uses the Xdr class to provide a uniform interface to input/output operations for files in either XDR binary or ASCII text formats.
### GetPot

GetPot is a powerful command line and configuration file parsing for C++, Python, Ruby and Java. This tool provides many features, such as separate treatment for options, variables, and flags, unrecognized object detection, prefixes and much more.`libMesh`

uses GetPot to parse command line options upon initialization and for input file parsing in some of the examples.
### libHilbert

libHilbert (no longer maintained) is a library originally written by Chris Hamilton for producing compact Hilbert indices for multidimensional data.`libMesh`

uses `libHilbert`

to assign unique, global identifiers for nodes an elements which are independent of a particular domain decomposition.
### MetaPhysicL

MetaPhysicL is a template metaprogramming library by Roy Stogner which implements numerical operator-overloads in support of (primarily) finite element simulations. It is very useful in particular for automatic differentiation. As of Aug 20, 2018, libMesh includes a git submodule for MetaPhysicL which uses a so-called "relative" path in the .gitmodules file. This means that the user's "origin" URL (either https or ssh) is used to determine the full MetaPhysicL URL. If you wish to use MetaPhysicL within libMesh, you must run`git submodule update --init`

before running configure, and pass `--enable-metaphysicl`

to the configure invocation in addition to other arguments. If you are working with a tarball release of libMesh after 1.3.x, MetaPhysicL may not be available (although we are currently working to support this).