LADEL
main
Sparse LDL factorization package with rank 1 and rowadd/rowdel updates
|
Main solver API.
Functions | |
ladel_int | ladel_factorize (ladel_sparse_matrix *M, ladel_symbolics *sym, ladel_int ordering_method, ladel_factor **LD, ladel_work *work) |
Computes the \(LDL^T\) factorization of \(M\). More... | |
ladel_int | ladel_factorize_with_diag (ladel_sparse_matrix *M, ladel_diag d, ladel_symbolics *sym, ladel_int ordering_method, ladel_factor **LD, ladel_work *work) |
Computes the \(LDL^T\) factorization of \(M + \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix}\). More... | |
ladel_int | ladel_factorize_advanced (ladel_sparse_matrix *M, ladel_symbolics *sym, ladel_int ordering_method, ladel_factor **LD, ladel_sparse_matrix *Mbasis, ladel_work *work) |
Computes the \(LDL^T\) factorization of \(M,\) but allocates based on Mbasis. More... | |
ladel_int | ladel_factorize_advanced_with_diag (ladel_sparse_matrix *M, ladel_diag d, ladel_symbolics *sym, ladel_int ordering_method, ladel_factor **LD, ladel_sparse_matrix *Mbasis, ladel_work *work) |
Computes the \(LDL^T\) factorization of \(M+ \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix},\) but allocates based on Mbasis. More... | |
ladel_int | ladel_factorize_with_prior_basis (ladel_sparse_matrix *M, ladel_symbolics *sym, ladel_factor *LD, ladel_work *work) |
Computes the \(LDL^T\) factorization of \(M,\) provided LD was allocated before. More... | |
ladel_int | ladel_factorize_with_prior_basis_with_diag (ladel_sparse_matrix *M, ladel_diag d, ladel_symbolics *sym, ladel_factor *LD, ladel_work *work) |
Computes the \(LDL^T\) factorization of \(M+ \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix},\) provided LD was allocated before. More... | |
ladel_int | ladel_dense_solve (const ladel_factor *LD, const ladel_double *rhs, ladel_double *y, ladel_work *work) |
Computes \(y = LDL^T \backslash rhs\). More... | |
ladel_int | ladel_rank1_update (ladel_factor *LD, ladel_symbolics *sym, ladel_sparse_matrix *W, ladel_int col_in_W, ladel_double factor, ladel_int up_or_down, ladel_work *work) |
Updates an \(LDL^T\) factorization. More... | |
ladel_int | ladel_row_add (ladel_factor *LD, ladel_symbolics *sym, ladel_int row_in_L, ladel_sparse_matrix *W, ladel_int col_in_W, ladel_double diag, ladel_work *work) |
Updates an \(LDL^T\) factorization. More... | |
ladel_int | ladel_row_del (ladel_factor *LD, ladel_symbolics *sym, ladel_int row_in_L, ladel_work *work) |
Updates an \(LDL^T\) factorization. More... | |
ladel_int ladel_dense_solve | ( | const ladel_factor * | LD, |
const ladel_double * | rhs, | ||
ladel_double * | y, | ||
ladel_work * | work | ||
) |
ladel_int ladel_factorize | ( | ladel_sparse_matrix * | M, |
ladel_symbolics * | sym, | ||
ladel_int | ordering_method, | ||
ladel_factor ** | LD, | ||
ladel_work * | work | ||
) |
Computes the \(LDL^T\) factorization of \(M\).
M | Matrix to be factorized |
sym | Symbolics of the factorization |
ordering_method | Indicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING |
LD | Output struct containing the \(LDL^T\) factors |
work | LADEL workspace |
Definition at line 11 of file ladel.c.
ladel_int ladel_factorize_advanced | ( | ladel_sparse_matrix * | M, |
ladel_symbolics * | sym, | ||
ladel_int | ordering_method, | ||
ladel_factor ** | LD, | ||
ladel_sparse_matrix * | Mbasis, | ||
ladel_work * | work | ||
) |
Computes the \(LDL^T\) factorization of \(M,\) but allocates based on Mbasis.
This routine is used for subsequent update routines. LADEL assumes the user knows in advance the possible updates (at least the pattern), so that it can allocate the factor once. Dynamic reallocation during update routines is currently not supported.
M | Matrix to be factorized |
sym | Symbolics of the factorization |
ordering_method | Indicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING |
LD | Output struct containing the \(LDL^T\) factors |
Mbasis | Matrix that is used in the symbolic part of the factorization to allocate LD |
work | LADEL workspace |
Definition at line 46 of file ladel.c.
ladel_int ladel_factorize_advanced_with_diag | ( | ladel_sparse_matrix * | M, |
ladel_diag | d, | ||
ladel_symbolics * | sym, | ||
ladel_int | ordering_method, | ||
ladel_factor ** | LD, | ||
ladel_sparse_matrix * | Mbasis, | ||
ladel_work * | work | ||
) |
Computes the \(LDL^T\) factorization of \(M+ \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix},\) but allocates based on Mbasis.
This routine is used for subsequent update routines. LADEL assumes the user knows in advance the possible updates (at least the pattern), so that it can allocate the factor once. Dynamic reallocation during update routines is currently not supported.
M | Matrix to be factorized |
d | Diagonal parameters \(\alpha\) and \(n\) |
sym | Symbolics of the factorization |
ordering_method | Indicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING |
LD | Output struct containing the \(LDL^T\) factors |
Mbasis | Matrix that is used in the symbolic part of the factorization to allocate LD |
work | LADEL workspace |
Definition at line 53 of file ladel.c.
ladel_int ladel_factorize_with_diag | ( | ladel_sparse_matrix * | M, |
ladel_diag | d, | ||
ladel_symbolics * | sym, | ||
ladel_int | ordering_method, | ||
ladel_factor ** | LD, | ||
ladel_work * | work | ||
) |
Computes the \(LDL^T\) factorization of \(M + \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix}\).
M | Matrix to be factorized |
d | Diagonal parameters \(\alpha\) and \(n\) |
sym | Symbolics of the factorization |
ordering_method | Indicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING |
LD | Output struct containing the \(LDL^T\) factors |
work | LADEL workspace |
Definition at line 18 of file ladel.c.
ladel_int ladel_factorize_with_prior_basis | ( | ladel_sparse_matrix * | M, |
ladel_symbolics * | sym, | ||
ladel_factor * | LD, | ||
ladel_work * | work | ||
) |
Computes the \(LDL^T\) factorization of \(M,\) provided LD was allocated before.
M | Matrix to be factorized |
sym | Symbolics of the factorization |
LD | Output struct containing the \(LDL^T\) factors |
work | LADEL workspace |
Definition at line 90 of file ladel.c.
ladel_int ladel_factorize_with_prior_basis_with_diag | ( | ladel_sparse_matrix * | M, |
ladel_diag | d, | ||
ladel_symbolics * | sym, | ||
ladel_factor * | LD, | ||
ladel_work * | work | ||
) |
Computes the \(LDL^T\) factorization of \(M+ \alpha \begin{bmatrix}I_{n} & \\ & 0\end{bmatrix},\) provided LD was allocated before.
M | Matrix to be factorized |
d | Diagonal parameters \(\alpha\) and \(n\) |
sym | Symbolics of the factorization |
LD | Output struct containing the \(LDL^T\) factors |
work | LADEL workspace |
Definition at line 97 of file ladel.c.
ladel_int ladel_rank1_update | ( | ladel_factor * | LD, |
ladel_symbolics * | sym, | ||
ladel_sparse_matrix * | W, | ||
ladel_int | col_in_W, | ||
ladel_double | factor, | ||
ladel_int | up_or_down, | ||
ladel_work * | work | ||
) |
Updates an \(LDL^T\) factorization.
If LD contains the factors of \(M\) on input, LD will contain the factors of \(M + up\_or\_down*factor^2*ww^T,\) where \(w = W(:, col\_in\_W).\)
LD | Factors of an \(LDL^T\) factorization |
sym | Associated symbolic information |
W | Sparse matrix containing the vector for the update |
col_in_W | Column of W that is used for the update |
factor | Scaling factor for the update vector |
up_or_down | Flag indicating UPDATE or DOWNDATE |
work | LADEL workspace |
Definition at line 122 of file ladel_rank1_mod.c.
ladel_int ladel_row_add | ( | ladel_factor * | LD, |
ladel_symbolics * | sym, | ||
ladel_int | row_in_L, | ||
ladel_sparse_matrix * | W, | ||
ladel_int | col_in_W, | ||
ladel_double | diag, | ||
ladel_work * | work | ||
) |
Updates an \(LDL^T\) factorization.
If LD contains the factors of \(M = \begin{bmatrix} M_{11} & 0 & M_{13} \\ 0 & 1 & 0 \\ M_{13}^T & 0 & M_{33} \end{bmatrix} \) on input, LD will contain the factors of \(\begin{bmatrix} M_{11} & m_{12} & M_{13} \\ m_{12}^T & m_{22} & m_{32}^T \\ M_{13}^T & m_{32} & M_{33} \end{bmatrix} \) on output, where \(m = W(:, col\_in\_ W),\) and \(row\_in\_L = n + 1\) with \([n,n] = size(M_{11}).\)
LD | Factors of an \(LDL^T\) factorization |
sym | Associated symbolic information |
row_in_L | Position of the added row/column |
W | Sparse matrix containing the vector for the update |
col_in_W | Column of W that is used for the update |
diag | Diagonal element \(m_{22}\) |
work | LADEL workspace |
Definition at line 12 of file ladel_row_mod.c.
ladel_int ladel_row_del | ( | ladel_factor * | LD, |
ladel_symbolics * | sym, | ||
ladel_int | row_in_L, | ||
ladel_work * | work | ||
) |
Updates an \(LDL^T\) factorization.
If LD contains the factors of \(\begin{bmatrix} M_{11} & m_{12} & M_{13} \\ m_{12}^T & m_{22} & m_{32}^T \\ M_{13}^T & m_{32} & M_{33} \end{bmatrix} \) on input, LD will contain the factors of \(M = \begin{bmatrix} M_{11} & 0 & M_{13} \\ 0 & 1 & 0 \\ M_{13}^T & 0 & M_{33} \end{bmatrix} \) on output, where \(row\_in\_L = n + 1\) with \([n,n] = size(M_{11}).\)
LD | Factors of an \(LDL^T\) factorization |
sym | Associated symbolic information |
row_in_L | Position of the deleted row/column |
work | LADEL workspace |
Definition at line 120 of file ladel_row_mod.c.