This component belongs to the category of LinearSolver. The role of the SparseLUSolver is to solve the linear system assuming that the matrix is invertible and sparse.

In order to solve this system, this solver will factorize the matrix into the product where is a lower triangular matrix with ones on its diagonal and is an upper triangonal matrix (https://en.wikipedia.org/wiki/LU_decomposition).

As this method relies on the Gaussian elimination, a partial pivot is applied on the lines of hence its factorization will be written as . The LU solver is a direct solver which will compute the exact solution of the linear system by successively solving two triangular systems.

## Data

The SparseLUSolver has only one data **permutation** that allows three choices : **-None**, no permutation, nor on the rows nor on the columns, is applied **-SuiteSparse**, use the SuiteSparse library as intended for a the LU decomposition and apply a fill reducing permutation on the columns only leaving the permutation on the lines available for the partial pivot **-METIS**, use the METIS library to compute a fill reducing permutation and apply it on both the lines and the columns. For this option we assume that the matrix is symmetric and we don’t apply any pivoting.

It is not currently possible to change the the type of permutation applied during a simulation.

Applying a fill reducing permutation aims at minimizing the number of non-null values in the decomposition, which would reduce the time spent on solving the triangular systems.

As the impact of the use of fill reducing permutations on the performances is highly influenced by the repartition of the nodes used to model an object, we advise the users to test which type of permutation is the best suited for their simulations.

## Usage

The SparseLUSolver **requires** the use (above in the scene graph) of an integration scheme, and (below in the scene graph) of a MechanicalObject storing the state information that the SparseLUSolver will access.

The SparseLUSolver is the most generic direct solver. It may be time consuming but it will be able compute the exact solution as soon as is invertible.

## Example

This component is used as follows in XML format:

or using SofaPython3:

An example scene involving a SparseLUSolver is available in *examples/Components/linearsolver/FEMBAR-SparseLUSolver.scn*

Last modified: 12 January 2023