Wiki

Clone wiki

mshr / Installation

Installation

Binary packages

Binary packages for Debian and Ubuntu are available through the FEniCS Personal Package Archive (PPA). More details at http://fenicsproject.org/download/ubuntu_details.html.

If you have added the FEniCS PPA to your sources.list it should suffice to do

sudo apt-get install fenics
this will install all necessary FEniCS components, including mshr.

Installation from source

mshr uses CMake for generating Makefiles. In the simplest form this means that

$ cmake <path to mshr source>  # configure
$ make                         # build
$ make install                 # install
These commands should be invoked from the directory where you want the (temporary) build files, preferably outside the source tree.

Configuring mshr

The configuration of mshr is controlled by command line arguments when invoking cmake. Type

$ cmake --help
for more details. One can also replace cmakeby cmake-gui to configure through a graphical user interface.

Some usefull arguments to cmake include

-DCMAKE_INSTALL_PREFIX=[PATH]
to install mshr in a non-standard location. The standard locations typically requires root access, so to install locally in the home directory, this is the way to go.

-DCMAKE_BUILD_TYPE=[Debug|Release|]
Use Release to get an optimized version and Debug if you need to include debug symbols in the binary. If you don't what to choose here, go with Release, the speedup compared to a debug build is large, typically a factor 100-150.

Dependencies

mshr requires Dolfin. If the Dolfin can't be found, the configuration of mshr will fail. In that case, help cmake find Dolfin with the command line argument -DDOLFIN_DIR=[path to Dolfin installation]

mshr relies on CGAL and Tetgen as mesh generation backends. However, they are both built from source as part of the installation. CGAL in turn, needs GMP and MPFR and Boost (boost is also a requirement for Dolfin).

Updated