Install the MUMPS module

This is an optional module that enables Chrono to use the MUMPS linear solver.

Read the introduction to modules for a technical background on the modularity of the Chrono project.

Chrono usually relies on its built-in solvers, whose good perfomance are guaranteed by leveraging the internal data structure. In fact, for a wide range of applications, these suffice.
However, for higher accuracy results, a direct solver could still be needed.

This module provides an interface to the third-party MUMPS solver.

Features

The Chrono::Mumps module allows to plug the MUMPS solver into Chrono and provides two interface:

  • an interface for Chrono - namely chrono::ChSolverMumps<> - that is not intended to be used directly by the user.
    This is the interface that the user should plug into the Chrono environment.
  • an interface for the end-user - namely chrono::ChMumpsEngine - that allows to directly operate with MUMPS using the Chrono data classes (if the user would ever have this need).
    The demo_MUMPS_MumpsEngine.cpp shows its usage, but the average usare should not be interested in it.

Look at the API section of this module for a more in-depth discussion.

Remarks

Requirements

  • To build applications based on this unit:

Building instructions

  1. Install the MUMPS library
    • Linux: TODO
    • Windows: since building the MUMPS DLLs is not straightforward, we provide for an archive (Mumps-5.1.1.zip) which includes precompiled libraries as well as all necessary header files. Simply unpack in a folder on disk and then provide that location during CMake configuration (see below).
    • MacOS: TODO
  2. Repeat the instructions for the full installation, but when you see the CMake window, you must set ENABLE_MODULE_MUMPS as 'on'.
    Set the CMake variable MUMPS_ROOT to point to the installation directory for MUMPS. It is expected that this directory contains the following sub-directories: 'include' (MUMPS headers), 'lib' (lib file), and 'bin' (shared library).
  3. Press 'Generate'

How to use it

  • Simply add this snippet anywhere in your code, before running the main simulation loop.
    This will inform Chrono to use the interface to the MUMPS solver.
    auto mumps_solver = chrono_types::make_shared<ChSolverMumps>();
    my_system.SetSolver(mumps_solver);
  • (Optional) Turn on the sparsity pattern lock (see chrono::ChSolverMumps and chrono::ChDirectSolverLS for further details)
    auto mumps_solver = chrono_types::make_shared<ChSolverMumps>();
    mumps_solver->SetSparsityPatternLock(true);
    my_system.SetSolver(mumps_solver);
  • By default, this solver uses the sparsity pattern learner (see chrono::ChDirectSolverLS) to infer the sparsity pattern before actually loading the non-zero elements. To disable the use of the sparsity pattern learner, call
    mumps_solver->UseSparsityPatternLearner(false);
  • Look at the API section of this module for documentation about classes and functions.