linalg 1.8.2
A linear algebra library that provides a user-friendly interface to several BLAS and LAPACK routines.
Loading...
Searching...
No Matches
sparskit::ilutp Interface Reference

Computes the incomplete LU factorization of a sparse matrix in CSR format using a dual truncation mechanism and pivoting. More...

Public Member Functions

subroutine ilutp (n, a, ja, ia, lfil, droptol, permtol, mbloc, alu, jlu, ju, iwk, w, jw, iperm, ierr)
 

Detailed Description

Computes the incomplete LU factorization of a sparse matrix in CSR format using a dual truncation mechanism and pivoting.

Parameters
[in]nThe row dimension of the matrix.
[in,out]aThe non-zero elements of matrix A. On output, the columns are permuted.
[in,out]jaThe column indices of matrix A. On output, the columns are permuted.
[in,out]iaThe index in A where the requested row starts. On output, the columns are permuted.
[in]lfilThe fill-in parameter. Each row of L and each row of U will have a maximum of lfil elements, excluding the diagonal element. lfil must be greater than or equal to zero.
[in]droptolThe threshold for dropping small terms in the factorization.
[in]permtolA tolerance ratio used to determine whether or not to permute two columns. At step I, columns I and J are permuted when ABS(A(I,J)) * PERMTOL .GT. ABS(A(I,I)). Good values are typically between 0.1 to 0.01.
[in]mblocIf desired, permuting can be done only within the diagonal blocks of size MBLOC. Useful for PDE problems with many degrees of freedom. If this feature is not required, simply set MBLOC equal to N.
[out]aluThe factored matrix stored in Modified Sparse Row (MSR) format containing the L and U factors together. The diagonal, stored in ALU(1:N), is inverted. Each i-th row of the ALU, JLU matrix contains the i-th row of L, excluding the diagonal entry, followed by the i-th row of U.
[out]jluThe column indices for the factored matrix.
[out]juAn N-element array containing the pointers to the beginning of each row of U in the factored matrix.
[in]iwkThe lengths of alu and jlu.
[out]wAn N+1 element workspace array.
[out]jwA 2*N element workspace array.
[out]ipermA 2*N element array containing the permutation arrays. IPERM(1:N) contains the old numbers of unknowns, and IPERM(N+1:) contains the new unknowns.
[out]ierrError flag:
  • 0: Successful return
  • .gt. 0: Zero pivot encountered at step number IERR.
  • -1: Input matrix is incorrect. The elimination process generated a row in L or U whose length is greater than N.
  • -2: The matrix L overflows the output array.
  • -3: The matrix U overflows the output array.
  • -4: Illegal value for @P lfil.
  • -5: Zero-valued row encountered.
Remarks
To avoid permuting the solution vector arrays for each LU-solve, the matrix A is permuted on return. Similarly for the U matrix. To permute the matrix back to its original state, use the following code.
do k = ia(1), ia(n+1) - 1
ja(k) = iperm(ja(k))
end do

Definition at line 409 of file sparskit.f90.

Constructor & Destructor Documentation

◆ ilutp()

subroutine sparskit::ilutp::ilutp ( integer(int32), intent(in) n,
real(real64), dimension(*), intent(inout) a,
integer(int32), dimension(*), intent(inout) ja,
integer(int32), dimension(n+1), intent(inout) ia,
integer(int32), intent(in) lfil,
real(real64), intent(in) droptol,
real(real64), intent(in) permtol,
integer(int32), intent(in) mbloc,
real(real64), dimension(*), intent(out) alu,
integer(int32), dimension(*), intent(out) jlu,
integer(int32), dimension(n), intent(out) ju,
integer(int32), intent(in) iwk,
real(real64), dimension(n+1), intent(out) w,
integer(int32), dimension(2*n), intent(out) jw,
integer(int32), dimension(2*n), intent(out) iperm,
integer(int32), intent(out) ierr )

Definition at line 409 of file sparskit.f90.


The documentation for this interface was generated from the following file: