lu_dec - fabiankindermann/ce-fortran GitHub Wiki
subroutine lu_dec(a, l, u)
This subroutine decomposes a matrix into a lower triangular matrix
and an upper triangular matrix
, such that
. Note that the matrices
,
and
need to be square matrices and all have the same size.
-
real*8 :: a(:, :)
The square matrix that should be decomposed into a lower and an upper triangular martix.
-
real*8 :: l(:, :)
The lower triangular decomposition matrix. Must have the same size asa
. -
real*8 :: u(:, :)
The upper triangular decomposition matrix. Must have the same size asa
.
- Parts of this routine were copied and adapted from the Crout’s method with partial pivoting algorithm in:
- Press, W.H., Teukolsky, S.A., Vetterling, W.T. & Flannery, B.P. (1992). Numerical Recipes in Fortran 90: The Art of Parallel Scientific Computing, 2nd edition. Cambridge: Cambridge Univeristy Press.
- For further reading refer to:
- Golub, G.H. & Van Loan, C.F. (2013). Matrix Computations, 4th ed. Baltimore: Johns Hopkins University Press.
- This routine is used in the following programs:
prog02_02.f90