|
typedef internal::SparseLUImpl< Scalar, Index > | Base |
|
typedef MatrixType::Index | Index |
|
typedef Matrix< Index, Dynamic, 1 > | IndexVector |
|
typedef _MatrixType | MatrixType |
|
typedef SparseMatrix< Scalar, ColMajor, Index > | NCMatrix |
|
typedef _OrderingType | OrderingType |
|
typedef PermutationMatrix< Dynamic, Dynamic, Index > | PermutationType |
|
typedef MatrixType::RealScalar | RealScalar |
|
typedef MatrixType::Scalar | Scalar |
|
typedef Matrix< Scalar, Dynamic, 1 > | ScalarVector |
|
typedef internal::MappedSuperNodalMatrix< Scalar, Index > | SCMatrix |
|
typedef Ref< Matrix< _MatrixType::Index, Dynamic, 1 > > | BlockIndexVector |
|
typedef Ref< Matrix< _MatrixType::Scalar, Dynamic, 1 > > | BlockScalarVector |
|
typedef LU_GlobalLU_t< IndexVector, ScalarVector > | GlobalLU_t |
|
typedef Matrix< _MatrixType::Index, Dynamic, 1 > | IndexVector |
|
typedef SparseMatrix< _MatrixType::Scalar, ColMajor, _MatrixType::Index > | MatrixType |
|
typedef ScalarVector::RealScalar | RealScalar |
|
typedef Matrix< _MatrixType::Scalar, Dynamic, 1 > | ScalarVector |
|
|
void | initperfvalues () |
|
_MatrixType::Index | column_bmod (const _MatrixType::Indexjcol, const _MatrixType::Indexnseg, BlockScalarVector dense, ScalarVector &tempv, BlockIndexVector segrep, BlockIndexVector repfnz, _MatrixType::Indexfpanelc, GlobalLU_t &glu) |
| Performs numeric block updates (sup-col) in topological order. More...
|
|
_MatrixType::Index | column_dfs (const _MatrixType::Indexm, const _MatrixType::Indexjcol, IndexVector &perm_r, _MatrixType::Indexmaxsuper, _MatrixType::Index &nseg, BlockIndexVector lsub_col, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu) |
| Performs a symbolic factorization on column jcol and decide the supernode boundary. More...
|
|
_MatrixType::Index | copy_to_ucol (const _MatrixType::Indexjcol, const _MatrixType::Indexnseg, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &perm_r, BlockScalarVector dense, GlobalLU_t &glu) |
| Performs numeric block updates (sup-col) in topological order. More...
|
|
void | countnz (const _MatrixType::Indexn, _MatrixType::Index &nnzL, _MatrixType::Index &nnzU, GlobalLU_t &glu) |
| Count Nonzero elements in the factors. More...
|
|
void | dfs_kernel (const _MatrixType::Indexjj, IndexVector &perm_r, _MatrixType::Index &nseg, IndexVector &panel_lsub, IndexVector &segrep, Ref< IndexVector > repfnz_col, IndexVector &xprune, Ref< IndexVector > marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu, _MatrixType::Index &nextl_col, _MatrixType::Indexkrow, Traits &traits) |
|
_MatrixType::Index | expand (VectorType &vec, _MatrixType::Index &length, _MatrixType::IndexnbElts, _MatrixType::Indexkeep_prev, _MatrixType::Index &num_expansions) |
|
void | fixupL (const _MatrixType::Indexn, const IndexVector &perm_r, GlobalLU_t &glu) |
| Fix up the data storage lsub for L-subscripts. More...
|
|
void | heap_relax_snode (const _MatrixType::Indexn, IndexVector &et, const _MatrixType::Indexrelax_columns, IndexVector &descendants, IndexVector &relax_end) |
| Identify the initial relaxed supernodes. More...
|
|
_MatrixType::Index | memInit (_MatrixType::Indexm, _MatrixType::Indexn, _MatrixType::Indexannz, _MatrixType::Indexlwork, _MatrixType::Indexfillratio, _MatrixType::Indexpanel_size, GlobalLU_t &glu) |
| Allocate various working space for the numerical factorization phase. More...
|
|
_MatrixType::Index | memXpand (VectorType &vec, _MatrixType::Index &maxlen, _MatrixType::IndexnbElts, MemType memtype, _MatrixType::Index &num_expansions) |
| Expand the existing storage. More...
|
|
void | panel_bmod (const _MatrixType::Indexm, const _MatrixType::Indexw, const _MatrixType::Indexjcol, const _MatrixType::Indexnseg, ScalarVector &dense, ScalarVector &tempv, IndexVector &segrep, IndexVector &repfnz, GlobalLU_t &glu) |
| Performs numeric block updates (sup-panel) in topological order. More...
|
|
void | panel_dfs (const _MatrixType::Indexm, const _MatrixType::Indexw, const _MatrixType::Indexjcol, MatrixType &A, IndexVector &perm_r, _MatrixType::Index &nseg, ScalarVector &dense, IndexVector &panel_lsub, IndexVector &segrep, IndexVector &repfnz, IndexVector &xprune, IndexVector &marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu) |
| Performs a symbolic factorization on a panel of columns [jcol, jcol+w) More...
|
|
_MatrixType::Index | pivotL (const _MatrixType::Indexjcol, const RealScalar &diagpivotthresh, IndexVector &perm_r, IndexVector &iperm_c, _MatrixType::Index &pivrow, GlobalLU_t &glu) |
| Performs the numerical pivotin on the current column of L, and the CDIV operation. More...
|
|
void | pruneL (const _MatrixType::Indexjcol, const IndexVector &perm_r, const _MatrixType::Indexpivrow, const _MatrixType::Indexnseg, const IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, GlobalLU_t &glu) |
| Prunes the L-structure. More...
|
|
void | relax_snode (const _MatrixType::Indexn, IndexVector &et, const _MatrixType::Indexrelax_columns, IndexVector &descendants, IndexVector &relax_end) |
| Identify the initial relaxed supernodes. More...
|
|
_MatrixType::Index | snode_bmod (const _MatrixType::Indexjcol, const _MatrixType::Indexfsupc, ScalarVector &dense, GlobalLU_t &glu) |
|
_MatrixType::Index | snode_dfs (const _MatrixType::Indexjcol, const _MatrixType::Indexkcol, const MatrixType &mat, IndexVector &xprune, IndexVector &marker, GlobalLU_t &glu) |
|
template<typename _MatrixType, typename _OrderingType>
class Eigen::SparseLU< _MatrixType, _OrderingType >
Sparse supernodal LU factorization for general matrices.
This class implements the supernodal LU factorization for general matrices. It uses the main techniques from the sequential SuperLU package (http://crd-legacy.lbl.gov/~xiaoye/SuperLU/). It handles transparently real and complex arithmetics with single and double precision, depending on the scalar type of your input matrix. The code has been optimized to provide BLAS-3 operations during supernode-panel updates. It benefits directly from the built-in high-performant Eigen BLAS routines. Moreover, when the size of a supernode is very small, the BLAS calls are avoided to enable a better optimization from the compiler. For best performance, you should compile it with NDEBUG flag to avoid the numerous bounds checking on vectors.
An important parameter of this class is the ordering method. It is used to reorder the columns (and eventually the rows) of the matrix to reduce the number of new elements that are created during numerical factorization. The cheapest method available is COLAMD. See the OrderingMethods module for the list of built-in and external ordering methods.
Simple example with key steps
VectorXd x(n), b(n);
SparseMatrix<double, ColMajor> A;
SparseLU<SparseMatrix<scalar, ColMajor>, COLAMDOrdering<Index> > solver;
solver.analyzePattern(A);
solver.factorize(A);
x = solver.solve(b);
- Warning
- The input matrix A should be in a compressed and column-major form. Otherwise an expensive copy will be made. You can call the inexpensive makeCompressed() to get a compressed matrix.
- Note
- Unlike the initial SuperLU implementation, there is no step to equilibrate the matrix. For badly scaled matrices, this step can be useful to reduce the pivoting during factorization. If this is the case for your matrices, you can try the basic scaling method at "unsupported/Eigen/src/IterativeSolvers/Scaling.h"
- Template Parameters
-
_MatrixType | The type of the sparse matrix. It must be a column-major SparseMatrix<> |
_OrderingType | The ordering method to use, either AMD, COLAMD or METIS. Default is COLMAD |
- See also
- TutorialSparseDirectSolvers
-
OrderingMethods_Module
Definition at line 17 of file SparseLU.h.