General linear algebra routines. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | sqminv (v, b, n, nrank, diag, next) |
Matrix inversion. | |
subroutine | devrot (n, diag, u, v, work, iwork) |
Diagonalization. | |
subroutine | dbgax (a, x, y, m, n) |
Multiply general M-by-N matrix A and N-vector X. | |
subroutine | dbavat (v, a, w, n, m) |
A V AT product (similarity). | |
subroutine | sqmibb (v, b, n, nbdr, nbnd, inv, nrank) |
Bordered band matrix. | |
subroutine | dbprv (lun, v, n) |
Prints the symmetric N-by-N matrix V. |
General linear algebra routines.
***** Collection of utility routines from V. Blobel *****
Definition in file gblnum.f90.
subroutine dbavat | ( | double precision, dimension(*), intent(in) | v, |
double precision, dimension(*), intent(in) | a, | ||
double precision, dimension(*), intent(out) | w, | ||
integer, intent(in) | n, | ||
integer, intent(in) | m | ||
) |
A V AT product (similarity).
Multiply symmetric N-by-N matrix from the left with general M-by-N matrix and from the right with the transposed of the same general matrix to form symmetric M-by-M matrix (used for error propagation).
[in] | V | symmetric N-by-N matrix |
[in] | A | general M-by-N matrix |
[out] | W | symmetric M-by-M matrix |
[in] | M | rows of A |
[in] | N | columns of A |
Definition at line 463 of file gblnum.f90.
Referenced by gbltraj::gblres(), and test().
subroutine dbgax | ( | double precision, dimension(*), intent(in) | a, |
double precision, dimension(*), intent(in) | x, | ||
double precision, dimension(*), intent(out) | y, | ||
integer, intent(in) | m, | ||
integer, intent(in) | n | ||
) |
Multiply general M-by-N matrix A and N-vector X.
[in] | A | general M-by-N matrix (A11 A12 ... A1N A21 A22 ...) |
[in] | X | N vector |
[out] | Y | = M vector |
[in] | M | rows of A |
[in] | N | columns of A |
Definition at line 427 of file gblnum.f90.
Referenced by gbltraj::gblres().
subroutine dbprv | ( | integer, intent(inout) | lun, |
double precision, dimension(*), intent(inout) | v, | ||
integer, intent(in) | n | ||
) |
Prints the symmetric N-by-N matrix V.
[in] | LUN | output unit |
[in] | V | N-by-N matrix V (symmetric storage) |
[in] | N | size |
Definition at line 788 of file gblnum.f90.
Referenced by test().
subroutine devrot | ( | integer, intent(in) | n, |
double precision, dimension(n), intent(out) | diag, | ||
double precision, dimension(n,n), intent(out) | u, | ||
double precision, dimension(*), intent(in) | v, | ||
double precision, dimension(n), intent(out) | work, | ||
integer, dimension(n), intent(out) | iwork | ||
) |
Diagonalization.
Determination of eigenvalues and eigenvectors of symmetric matrix V by Householder method
[in] | n | size of matrix |
[out] | diag | diagonal elements |
[out] | u | transformation matrix |
[in] | v | symmetric matrix, unchanged |
[out] | work | work array |
[out] | iwork | work array |
Definition at line 182 of file gblnum.f90.
Referenced by gbltraj::gbldat().
subroutine sqmibb | ( | double precision, dimension(*), intent(inout) | v, |
double precision, dimension(n), intent(out) | b, | ||
integer, intent(in) | n, | ||
integer, intent(in) | nbdr, | ||
integer, intent(in) | nbnd, | ||
integer, intent(in) | inv, | ||
integer, intent(out) | nrank | ||
) |
Bordered band matrix.
Obtain solution of a system of linear equations with symmetric bordered band matrix (V * X = B), on request inverse is calculated. For band part root-free Cholesky decomposition and forward/backward substitution is used.
Use decomposition in border and band part for block matrix algebra:
| A Ct | | x1 | | b1 | , A is the border part | | * | | = | | , Ct is the mixed part | C D | | x2 | | b2 | , D is the band part
Explicit inversion of D is avoided by using solution X of D*X=C (X=D^-1*C, obtained from Cholesky decomposition and forward/backward substitution)
| x1 | | E*b1 - E*Xt*b2 | , E^-1 = A-Ct*D^-1*C = A-Ct*X | | = | | | x2 | | x - X*x1 | , x is solution of D*x=b2 (x=D^-1*b2)
Inverse matrix is:
| E -E*Xt | | | , only band part of (D^-1 + X*E*Xt) | -X*E D^-1 + X*E*Xt | is calculated for inv=1
[in,out] | V | symmetric N-by-N matrix in symmetric storage mode (V(1) = V11, V(2) = V12, V(3) = V22, V(4) = V13, ...), replaced by inverse matrix |
[in,out] | B | N-vector, replaced by solution vector |
[in] | N | size of V, B |
[in] | NBDR | border size |
[in] | NBND | band width |
[in] | INV | =1 calculate band part of inverse (for pulls), >1 calculate complete inverse |
[out] | NRANK | rank of matrix V |
Definition at line 557 of file gblnum.f90.
References dbcdec(), and sqminv().
Referenced by gbltraj::gblfit().
subroutine sqminv | ( | double precision, dimension(*), intent(inout) | v, |
double precision, dimension(n), intent(out) | b, | ||
integer, intent(in) | n, | ||
integer, intent(out) | nrank, | ||
double precision, dimension(n), intent(out) | diag, | ||
integer, dimension(n), intent(out) | next | ||
) |
Matrix inversion.
Obtain solution of a system of linear equations with symmetric matrix (V * X = B) and the inverse.
Method of solution is by elimination selecting the pivot on the diagonal each stage. The rank of the matrix is returned in NRANK. For NRANK ne N, all remaining rows and cols of the resulting matrix V and the corresponding elements of B are set to zero.
[in,out] | V | symmetric N-by-N matrix in symmetric storage mode (V(1) = V11, V(2) = V12, V(3) = V22, V(4) = V13, ...), replaced by inverse matrix |
[in,out] | B | N-vector, replaced by solution vector |
[in] | N | size of V, B |
[out] | NRANK | rank of matrix V |
[out] | DIAG | double precision scratch array |
[out] | NEXT | integer aux array |
Definition at line 58 of file gblnum.f90.
Referenced by sqmibb().