GetILUD
This routine computes the ILU factorization with standard threshold dropping: at ith step of elimination, an element a(i,j)
in row i is dropped if it satisfies the following criterion:
where is average magnitude of elements in row i of A
, which is given by:
where, is the number of nonzeros in ith row.
- There is no control on memory size required for the factors as is done in ILUT.
- This routine computes also various diagonal compensation ILU's such, MILU. These are defined through the parameter
alpha
.
All diagonal elements of the input matrix must be nonzero.
Interface
- ܀ Interface 1
- ܀ Interface 2
- ↢
INTERFACE
MODULE SUBROUTINE GetILUD(obj, ALU, JLU, JU, alpha, droptol)
TYPE(CSRMatrix*), INTENT(INOUT) :: obj
REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ALU(:)
INTEGER(I4B), ALLOCATABLE, INTENT(INOUT) :: JLU(:)
INTEGER(I4B), ALLOCATABLE, INTENT(INOUT) :: JU(:)
REAL(DFP), INTENT(IN) :: alpha
REAL(DFP), INTENT(IN) :: droptol
END SUBROUTINE GetILUD
END INTERFACE
-
alpha
= diagonal compensation parameter, alpha*
(sum of all dropped out elements in a given row) is added to the diagonal element of U of the factorization, therefore:alph = 0
means the scheme is ILU with threshold, that is, no compensationalph = 1
means the scheme is MILU with threshold.
-
droptol
= Threshold parameter for dropping small terms in the factorization. During the elimination, a terma(i,j)
is dropped wheneverabs (a(i,j)) .lt. tol
-
nnz
the number of NNZ elements in the row. -
obj
matrix stored in Compressed Sparse Row format. -
ALU,JLU
, 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 ith row of the ALU,JLU matrix contains the ith row of L (excluding the diagonal entry=1) followed by the ith row of U. -
JU
= integer array of length n containing the pointers to the beginning of each row of U in the matrix ALU,JLU. -
droptol
it governs the theresholding in L and U. Any element whose MAGNITUDE is less than some tolerance (relative to the abs value of diagonal element in U) is dropped.
INTERFACE
MODULE SUBROUTINE GetILUD(obj, Pmat, alpha, droptol)
TYPE(CSRMatrix_), INTENT(INOUT) :: obj
TYPE(CSRMatrix_), INTENT(INOUT) :: Pmat
REAL(DFP), INTENT(IN) :: alpha
REAL(DFP), INTENT(IN) :: droptol
END SUBROUTINE GetILUD
END INTERFACE
This routine call interface 1, and returns ILU factorization in Pmat, which is an instance of CSRMatrix_