LADEL main
Sparse LDL factorization package with rank 1 and rowadd/rowdel updates
Functions
Solver

Detailed Description

Main solver API.

See also
ladel.h

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...
 

Function Documentation

◆ ladel_dense_solve()

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\).

Parameters
LDFactors of an \(LDL^T\) factorization
rhsDense right-hand side
yOutput vector
workLADEL workspace
Returns
Status

Definition at line 120 of file ladel.c.

◆ ladel_factorize()

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\).

Parameters
MMatrix to be factorized
symSymbolics of the factorization
ordering_methodIndicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING
LDOutput struct containing the \(LDL^T\) factors
workLADEL workspace
Returns
Status

Definition at line 11 of file ladel.c.

+ Here is the call graph for this function:

◆ ladel_factorize_advanced()

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.

Parameters
MMatrix to be factorized
symSymbolics of the factorization
ordering_methodIndicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING
LDOutput struct containing the \(LDL^T\) factors
MbasisMatrix that is used in the symbolic part of the factorization to allocate LD
workLADEL workspace
Returns
Status

Definition at line 46 of file ladel.c.

+ Here is the call graph for this function:

◆ ladel_factorize_advanced_with_diag()

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.

Parameters
MMatrix to be factorized
dDiagonal parameters \(\alpha\) and \(n\)
symSymbolics of the factorization
ordering_methodIndicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING
LDOutput struct containing the \(LDL^T\) factors
MbasisMatrix that is used in the symbolic part of the factorization to allocate LD
workLADEL workspace
Returns
Status

Definition at line 53 of file ladel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ladel_factorize_with_diag()

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}\).

Parameters
MMatrix to be factorized
dDiagonal parameters \(\alpha\) and \(n\)
symSymbolics of the factorization
ordering_methodIndicator to choose the ordering method: AMD, NO_ORDERING or GIVEN_ORDERING
LDOutput struct containing the \(LDL^T\) factors
workLADEL workspace
Returns
Status

Definition at line 18 of file ladel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ladel_factorize_with_prior_basis()

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.

Parameters
MMatrix to be factorized
symSymbolics of the factorization
LDOutput struct containing the \(LDL^T\) factors
workLADEL workspace
Returns
Status

Definition at line 90 of file ladel.c.

+ Here is the call graph for this function:

◆ ladel_factorize_with_prior_basis_with_diag()

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.

Parameters
MMatrix to be factorized
dDiagonal parameters \(\alpha\) and \(n\)
symSymbolics of the factorization
LDOutput struct containing the \(LDL^T\) factors
workLADEL workspace
Returns
Status

Definition at line 97 of file ladel.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ladel_rank1_update()

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).\)

Parameters
LDFactors of an \(LDL^T\) factorization
symAssociated symbolic information
WSparse matrix containing the vector for the update
col_in_WColumn of W that is used for the update
factorScaling factor for the update vector
up_or_downFlag indicating UPDATE or DOWNDATE
workLADEL workspace
Returns
Status

Definition at line 122 of file ladel_rank1_mod.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ladel_row_add()

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}).\)

Parameters
LDFactors of an \(LDL^T\) factorization
symAssociated symbolic information
row_in_LPosition of the added row/column
WSparse matrix containing the vector for the update
col_in_WColumn of W that is used for the update
diagDiagonal element \(m_{22}\)
workLADEL workspace
Returns
Status

Definition at line 12 of file ladel_row_mod.c.

+ Here is the call graph for this function:

◆ ladel_row_del()

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}).\)

Parameters
LDFactors of an \(LDL^T\) factorization
symAssociated symbolic information
row_in_LPosition of the deleted row/column
workLADEL workspace
Returns
Status

Definition at line 120 of file ladel_row_mod.c.

+ Here is the call graph for this function: