#include <SparseLUImpl.h>
Public Types | |
typedef Ref< Matrix< Index, Dynamic, 1 > > | BlockIndexVector |
typedef Ref< Matrix< Scalar, Dynamic, 1 > > | BlockScalarVector |
typedef LU_GlobalLU_t < IndexVector, ScalarVector > | GlobalLU_t |
typedef Matrix< Index, Dynamic, 1 > | IndexVector |
typedef SparseMatrix< Scalar, ColMajor, Index > | MatrixType |
typedef ScalarVector::RealScalar | RealScalar |
typedef Matrix< Scalar, Dynamic, 1 > | ScalarVector |
Protected Member Functions | |
Index | column_bmod (const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector &tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t &glu) |
Performs numeric block updates (sup-col) in topological order. | |
Index | column_dfs (const Index m, const Index jcol, IndexVector &perm_r, Index maxsuper, 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. | |
Index | copy_to_ucol (const Index jcol, const Index nseg, IndexVector &segrep, BlockIndexVector repfnz, IndexVector &perm_r, BlockScalarVector dense, GlobalLU_t &glu) |
Performs numeric block updates (sup-col) in topological order. | |
void | countnz (const Index n, Index &nnzL, Index &nnzU, GlobalLU_t &glu) |
Count Nonzero elements in the factors. | |
template<typename Traits > | |
void | dfs_kernel (const Index jj, IndexVector &perm_r, Index &nseg, IndexVector &panel_lsub, IndexVector &segrep, Ref< IndexVector > repfnz_col, IndexVector &xprune, Ref< IndexVector > marker, IndexVector &parent, IndexVector &xplore, GlobalLU_t &glu, Index &nextl_col, Index krow, Traits &traits) |
template<typename VectorType > | |
Index | expand (VectorType &vec, Index &length, Index nbElts, Index keep_prev, Index &num_expansions) |
void | fixupL (const Index n, const IndexVector &perm_r, GlobalLU_t &glu) |
Fix up the data storage lsub for L-subscripts. | |
void | heap_relax_snode (const Index n, IndexVector &et, const Index relax_columns, IndexVector &descendants, IndexVector &relax_end) |
Identify the initial relaxed supernodes. | |
Index | memInit (Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t &glu) |
Allocate various working space for the numerical factorization phase. | |
template<typename VectorType > | |
Index | memXpand (VectorType &vec, Index &maxlen, Index nbElts, MemType memtype, Index &num_expansions) |
Expand the existing storage. | |
void | panel_bmod (const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector &dense, ScalarVector &tempv, IndexVector &segrep, IndexVector &repfnz, GlobalLU_t &glu) |
Performs numeric block updates (sup-panel) in topological order. | |
void | panel_dfs (const Index m, const Index w, const Index jcol, MatrixType &A, IndexVector &perm_r, 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) | |
Index | pivotL (const Index jcol, const RealScalar &diagpivotthresh, IndexVector &perm_r, IndexVector &iperm_c, Index &pivrow, GlobalLU_t &glu) |
Performs the numerical pivotin on the current column of L, and the CDIV operation. | |
void | pruneL (const Index jcol, const IndexVector &perm_r, const Index pivrow, const Index nseg, const IndexVector &segrep, BlockIndexVector repfnz, IndexVector &xprune, GlobalLU_t &glu) |
Prunes the L-structure. | |
void | relax_snode (const Index n, IndexVector &et, const Index relax_columns, IndexVector &descendants, IndexVector &relax_end) |
Identify the initial relaxed supernodes. | |
Index | snode_bmod (const Index jcol, const Index fsupc, ScalarVector &dense, GlobalLU_t &glu) |
Index | snode_dfs (const Index jcol, const Index kcol, const MatrixType &mat, IndexVector &xprune, IndexVector &marker, GlobalLU_t &glu) |
Friends | |
struct | column_dfs_traits |
Base class for sparseLU
Definition at line 20 of file SparseLUImpl.h.
typedef Ref<Matrix<Index,Dynamic,1> > Eigen::internal::SparseLUImpl< Scalar, Index >::BlockIndexVector |
Definition at line 27 of file SparseLUImpl.h.
typedef Ref<Matrix<Scalar,Dynamic,1> > Eigen::internal::SparseLUImpl< Scalar, Index >::BlockScalarVector |
Definition at line 26 of file SparseLUImpl.h.
typedef LU_GlobalLU_t<IndexVector, ScalarVector> Eigen::internal::SparseLUImpl< Scalar, Index >::GlobalLU_t |
Definition at line 28 of file SparseLUImpl.h.
typedef Matrix<Index,Dynamic,1> Eigen::internal::SparseLUImpl< Scalar, Index >::IndexVector |
Reimplemented in Eigen::SparseLU< _MatrixType, _OrderingType >.
Definition at line 24 of file SparseLUImpl.h.
typedef SparseMatrix<Scalar,ColMajor,Index> Eigen::internal::SparseLUImpl< Scalar, Index >::MatrixType |
Reimplemented in Eigen::SparseLU< _MatrixType, _OrderingType >.
Definition at line 29 of file SparseLUImpl.h.
typedef ScalarVector::RealScalar Eigen::internal::SparseLUImpl< Scalar, Index >::RealScalar |
Reimplemented in Eigen::SparseLU< _MatrixType, _OrderingType >.
Definition at line 25 of file SparseLUImpl.h.
typedef Matrix<Scalar,Dynamic,1> Eigen::internal::SparseLUImpl< Scalar, Index >::ScalarVector |
Reimplemented in Eigen::SparseLU< _MatrixType, _OrderingType >.
Definition at line 23 of file SparseLUImpl.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::column_bmod | ( | const Index | jcol, |
const Index | nseg, | ||
BlockScalarVector | dense, | ||
ScalarVector & | tempv, | ||
BlockIndexVector | segrep, | ||
BlockIndexVector | repfnz, | ||
Index | fpanelc, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Performs numeric block updates (sup-col) in topological order.
jcol | current column to update |
nseg | Number of segments in the U part |
dense | Store the full representation of the column |
tempv | working array |
segrep | segment representative ... |
repfnz | ??? First nonzero column in each row ??? ... |
fpanelc | First column in the current panel |
glu | Global LU data. |
Definition at line 53 of file SparseLU_column_bmod.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::column_dfs | ( | const Index | m, |
const Index | jcol, | ||
IndexVector & | perm_r, | ||
Index | maxsuper, | ||
Index & | nseg, | ||
BlockIndexVector | lsub_col, | ||
IndexVector & | segrep, | ||
BlockIndexVector | repfnz, | ||
IndexVector & | xprune, | ||
IndexVector & | marker, | ||
IndexVector & | parent, | ||
IndexVector & | xplore, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Performs a symbolic factorization on column jcol and decide the supernode boundary.
A supernode representative is the last column of a supernode. The nonzeros in U[*,j] are segments that end at supernodes representatives. The routine returns a list of the supernodal representatives in topological order of the dfs that generates them. The location of the first nonzero in each supernodal segment (supernodal entry location) is also returned.
m | number of rows in the matrix | |
jcol | Current column | |
perm_r | Row permutation | |
maxsuper | Maximum number of column allowed in a supernode | |
[in,out] | nseg | Number of segments in current U[*,j] - new segments appended |
lsub_col | defines the rhs vector to start the dfs | |
[in,out] | segrep | Segment representatives - new segments appended |
repfnz | First nonzero location in each row | |
xprune | ||
marker | marker[i] == jj, if i was visited during dfs of current column jj; | |
parent | ||
xplore | working array | |
glu | global LU data |
Definition at line 93 of file SparseLU_column_dfs.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::copy_to_ucol | ( | const Index | jcol, |
const Index | nseg, | ||
IndexVector & | segrep, | ||
BlockIndexVector | repfnz, | ||
IndexVector & | perm_r, | ||
BlockScalarVector | dense, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Performs numeric block updates (sup-col) in topological order.
jcol | current column to update |
nseg | Number of segments in the U part |
segrep | segment representative ... |
repfnz | First nonzero column in each row ... |
perm_r | Row permutation |
dense | Store the full representation of the column |
glu | Global LU data. |
Definition at line 50 of file SparseLU_copy_to_ucol.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::countnz | ( | const Index | n, |
Index & | nnzL, | ||
Index & | nnzU, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Count Nonzero elements in the factors.
Definition at line 21 of file SparseLU_Utils.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::dfs_kernel | ( | const Index | jj, |
IndexVector & | perm_r, | ||
Index & | nseg, | ||
IndexVector & | panel_lsub, | ||
IndexVector & | segrep, | ||
Ref< IndexVector > | repfnz_col, | ||
IndexVector & | xprune, | ||
Ref< IndexVector > | marker, | ||
IndexVector & | parent, | ||
IndexVector & | xplore, | ||
GlobalLU_t & | glu, | ||
Index & | nextl_col, | ||
Index | krow, | ||
Traits & | traits | ||
) | [protected] |
Definition at line 62 of file SparseLU_panel_dfs.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::expand | ( | VectorType & | vec, |
Index & | length, | ||
Index | nbElts, | ||
Index | keep_prev, | ||
Index & | num_expansions | ||
) | [protected] |
Expand the existing storage to accomodate more fill-ins
vec | Valid pointer to the vector to allocate or expand | |
[in,out] | length | At input, contain the current length of the vector that is to be increased. At output, length of the newly allocated vector |
[in] | nbElts | Current number of elements in the factors |
keep_prev | 1: use length and do not expand the vector; 0: compute new_len and expand | |
[in,out] | num_expansions | Number of times the memory has been expanded |
Definition at line 64 of file SparseLU_Memory.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::fixupL | ( | const Index | n, |
const IndexVector & | perm_r, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Fix up the data storage lsub for L-subscripts.
It removes the subscripts sets for structural pruning, and applies permutation to the remaining subscripts
Definition at line 52 of file SparseLU_Utils.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::heap_relax_snode | ( | const Index | n, |
IndexVector & | et, | ||
const Index | relax_columns, | ||
IndexVector & | descendants, | ||
IndexVector & | relax_end | ||
) | [protected] |
Identify the initial relaxed supernodes.
This routine applied to a symmetric elimination tree. It assumes that the matrix has been reordered according to the postorder of the etree
n | The number of columns |
et | elimination tree |
relax_columns | Maximum number of columns allowed in a relaxed snode |
descendants | Number of descendants of each node in the etree |
relax_end | last column in a supernode |
Definition at line 46 of file SparseLU_heap_relax_snode.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::memInit | ( | Index | m, |
Index | n, | ||
Index | annz, | ||
Index | lwork, | ||
Index | fillratio, | ||
Index | panel_size, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Allocate various working space for the numerical factorization phase.
m | number of rows of the input matrix |
n | number of columns |
annz | number of initial nonzeros in the matrix |
lwork | if lwork=-1, this routine returns an estimated size of the required memory |
glu | persistent data to facilitate multiple factors : will be deleted later ?? |
fillratio | estimated ratio of fill in the factors |
panel_size | Size of a panel |
Definition at line 139 of file SparseLU_Memory.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::memXpand | ( | VectorType & | vec, |
Index & | maxlen, | ||
Index | nbElts, | ||
MemType | memtype, | ||
Index & | num_expansions | ||
) | [protected] |
Expand the existing storage.
vec | vector to expand | |
[in,out] | maxlen | On input, previous size of vec (Number of elements to copy ). on output, new size |
nbElts | current number of elements in the vector. | |
memtype | Type of the element to expand | |
num_expansions | Number of expansions |
Definition at line 205 of file SparseLU_Memory.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::panel_bmod | ( | const Index | m, |
const Index | w, | ||
const Index | jcol, | ||
const Index | nseg, | ||
ScalarVector & | dense, | ||
ScalarVector & | tempv, | ||
IndexVector & | segrep, | ||
IndexVector & | repfnz, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Performs numeric block updates (sup-panel) in topological order.
Before entering this routine, the original nonzeros in the panel were already copied i nto the spa[m,w]
m | number of rows in the matrix |
w | Panel size |
jcol | Starting column of the panel |
nseg | Number of segments in the U part |
dense | Store the full representation of the panel |
tempv | working array |
segrep | segment representative... first row in the segment |
repfnz | First nonzero rows |
glu | Global LU data. |
Definition at line 56 of file SparseLU_panel_bmod.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::panel_dfs | ( | const Index | m, |
const Index | w, | ||
const Index | jcol, | ||
MatrixType & | A, | ||
IndexVector & | perm_r, | ||
Index & | nseg, | ||
ScalarVector & | dense, | ||
IndexVector & | panel_lsub, | ||
IndexVector & | segrep, | ||
IndexVector & | repfnz, | ||
IndexVector & | xprune, | ||
IndexVector & | marker, | ||
IndexVector & | parent, | ||
IndexVector & | xplore, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Performs a symbolic factorization on a panel of columns [jcol, jcol+w)
A supernode representative is the last column of a supernode. The nonzeros in U[*,j] are segments that end at supernodes representatives
The routine returns a list of the supernodal representatives in topological order of the dfs that generates them. This list is a superset of the topological order of each individual column within the panel. The location of the first nonzero in each supernodal segment (supernodal entry location) is also returned. Each column has a separate list for this purpose.
Two markers arrays are used for dfs : marker[i] == jj, if i was visited during dfs of current column jj; marker1[i] >= jcol, if i was visited by earlier columns in this panel;
[in] | m | number of rows in the matrix |
[in] | w | Panel size |
[in] | jcol | Starting column of the panel |
[in] | A | Input matrix in column-major storage |
[in] | perm_r | Row permutation |
[out] | nseg | Number of U segments |
[out] | dense | Accumulate the column vectors of the panel |
[out] | panel_lsub | Subscripts of the row in the panel |
[out] | segrep | Segment representative i.e first nonzero row of each segment |
[out] | repfnz | First nonzero location in each row |
[out] | xprune | The pruned elimination tree |
[out] | marker | work vector |
parent | The elimination tree | |
xplore | work vector | |
glu | The global data structure |
Definition at line 219 of file SparseLU_panel_dfs.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::pivotL | ( | const Index | jcol, |
const RealScalar & | diagpivotthresh, | ||
IndexVector & | perm_r, | ||
IndexVector & | iperm_c, | ||
Index & | pivrow, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Performs the numerical pivotin on the current column of L, and the CDIV operation.
Pivot policy : (1) Compute thresh = u * max_(i>=j) abs(A_ij); (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN pivot row = k; ELSE IF abs(A_jj) >= thresh THEN pivot row = j; ELSE pivot row = m;
Note: If you absolutely want to use a given pivot order, then set u=0.0.
jcol | The current column of L | |
diagpivotthresh | diagonal pivoting threshold | |
[in,out] | perm_r | Row permutation (threshold pivoting) |
[in] | iperm_c | column permutation - used to finf diagonal of Pc*A*Pc' |
[out] | pivrow | The pivot row |
glu | Global LU data |
Definition at line 60 of file SparseLU_pivotL.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::pruneL | ( | const Index | jcol, |
const IndexVector & | perm_r, | ||
const Index | pivrow, | ||
const Index | nseg, | ||
const IndexVector & | segrep, | ||
BlockIndexVector | repfnz, | ||
IndexVector & | xprune, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Prunes the L-structure.
It prunes the L-structure of supernodes whose L-structure contains the current pivot row "pivrow"
jcol | The current column of L | |
[in] | perm_r | Row permutation |
[out] | pivrow | The pivot row |
nseg | Number of segments | |
segrep | ||
repfnz | ||
[out] | xprune | |
glu | Global LU data |
Definition at line 53 of file SparseLU_pruneL.h.
void Eigen::internal::SparseLUImpl< Scalar, Index >::relax_snode | ( | const Index | n, |
IndexVector & | et, | ||
const Index | relax_columns, | ||
IndexVector & | descendants, | ||
IndexVector & | relax_end | ||
) | [protected] |
Identify the initial relaxed supernodes.
This routine is applied to a column elimination tree. It assumes that the matrix has been reordered according to the postorder of the etree
n | the number of columns |
et | elimination tree |
relax_columns | Maximum number of columns allowed in a relaxed snode |
descendants | Number of descendants of each node in the etree |
relax_end | last column in a supernode |
Definition at line 47 of file SparseLU_relax_snode.h.
Index Eigen::internal::SparseLUImpl< Scalar, Index >::snode_bmod | ( | const Index | jcol, |
const Index | fsupc, | ||
ScalarVector & | dense, | ||
GlobalLU_t & | glu | ||
) | [protected] |
Index Eigen::internal::SparseLUImpl< Scalar, Index >::snode_dfs | ( | const Index | jcol, |
const Index | kcol, | ||
const MatrixType & | mat, | ||
IndexVector & | xprune, | ||
IndexVector & | marker, | ||
GlobalLU_t & | glu | ||
) | [protected] |
friend struct column_dfs_traits [friend] |
Definition at line 58 of file SparseLUImpl.h.