vcoord_gen  1.13.0
matrix_utils.f90 File Reference

Lower and upper triangular decomposition. More...

Go to the source code of this file.

Functions/Subroutines

subroutine lubksb (a, n, np, indx, b)
 Lower and upper triangular back substitution. More...
 
subroutine ludcmp (a, n, np, indx, d)
 This subprogram decomposes a matrix into a product of lower and upper triangular matrices. More...
 

Detailed Description

Lower and upper triangular decomposition.

Author
Mark Iredell
Date
2008-08-01

Definition in file matrix_utils.f90.

Function/Subroutine Documentation

◆ lubksb()

subroutine lubksb ( real, dimension(np,np), intent(in)  a,
integer, intent(in)  n,
integer, intent(in)  np,
integer, dimension(n), intent(in)  indx,
real, dimension(n), intent(inout)  b 
)

Lower and upper triangular back substitution.

Author
Iredell
Date
2008-08-01

This subprogram back substitutes to solve decomposed lower and upper triangular matrices as outputted by ludcmp.

Parameters
[in]areal(np,np) LU-decomposed matrix (from ludcmp)
[in]ninteger order of matrix
[in]npinteger dimension of matrix
[in]indxinteger(n) pivot indices (from ludcmp)
[in,out]b- input real(n) rhs vector of linear problem (will be overwritten)
  • output real(n) solution of linear problem (original A times output B equals original B)
Author
Mark Iredell
Date
2008-08-01

Definition at line 101 of file matrix_utils.f90.

Referenced by vcoord_gen().

◆ ludcmp()

subroutine ludcmp ( real, dimension(np,np), intent(inout)  a,
integer, intent(in)  n,
integer, intent(in)  np,
integer, dimension(n), intent(out)  indx,
real, intent(out)  d 
)

This subprogram decomposes a matrix into a product of lower and upper triangular matrices.

Parameters
[in,out]a- input: a real(np,np) matrix (will be overwritten) output:
  • output real(np,np) LU-decomposed matrix (U is upper part of A, including diagonal; L is lower part of A, with 1 as diagonal; L*U equals original A after permuting)
[in]ninteger order of matrix
[in]npinteger dimension of matrix
[out]indxinteger(n) pivot indices (original A rows are permuted in order i with indx(i))
[out]dreal determinant permutation (1 or -1, or 0 if singular) (determinant is output diagonal product times d)
Author
Mark Iredell
Date
2008-08-01

Definition at line 21 of file matrix_utils.f90.

Referenced by vcoord_gen().