This subroutine converts general sparse matrix A of order n from one skyline storage mode to another--that is, between the following:
Fortran | CALL DGKTRN (n, au, nu, idu, al, nl, idl, itran, aux, naux) |
C and C++ | dgktrn (n, au, nu, idu, al, nl, idl, itran, aux, naux); |
PL/I | CALL DGKTRN (n, au, nu, idu, al, nl, idl, itran, aux, naux); |
If ITRAN(1) = 0, A is stored in diagonal-out skyline storage mode.
If ITRAN(1) = 1, A is stored in profile-in skyline storage mode.
Specified as: a one-dimensional array of (at least) length nu, containing long-precision real numbers.
If ITRAN(1) = 0, A is stored in diagonal-out skyline storage mode.
If ITRAN(1) = 1, A is stored in profile-in skyline storage mode.
Specified as: a one-dimensional array of (at least) length nl, containing long-precision real numbers.
If ITRAN(1) = 0, diagonal-out skyline storage mode is used.
If ITRAN(1) = 1, profile-in skyline storage mode is used.
If ITRAN(2) = 0, diagonal-out skyline storage mode is used.
If ITRAN(2) = 1, profile-in skyline storage mode is used.
If ITRAN(3) = 1, matrix A is transformed in the positive direction, starting in row or column 1 and ending in row or column n.
If ITRAN(3) = -1, matrix A is transformed in the negative direction, starting in row or column n and ending in row or column 1.
Specified as: a one-dimensional array of (at least) length 3, containing fullword integers, where:
If naux = 0 and error 2015 is unrecoverable, aux is ignored.
Otherwise, it is the storage work area used by this subroutine. Its size is specified by naux.
Specified as: an area of storage, containing naux long-precision real numbers.
If naux = 0 and error 2015 is unrecoverable, DGKTRN dynamically allocates the work area used by this subroutine. The work area is deallocated before control is returned to the calling program.
Otherwise, naux >= 2n.
If ITRAN(2) = 0, A is stored in diagonal-out skyline storage mode.
If ITRAN(2) = 1, A is stored in profile-in skyline storage mode.
Returned as: a one-dimensional array of (at least) length nu, containing long-precision real numbers.
If ITRAN(2) = 0, A is stored in diagonal-out skyline storage mode.
If ITRAN(2) = 1, A is stored in profile-in skyline storage mode.
Returned as: a one-dimensional array of (at least) length nl, containing long-precision real numbers.
The direction specified by ITRAN(3) should be opposite the most
recent direction of access through the matrix performed by the DGKFS or DGKFSP
subroutine, as indicated in the following table:
Most Recent Computation Performed by DGKFS/DGKFSP | Direction Used by DGKFS/DGKFSP | Direction to Specify in ITRAN(3) |
---|---|---|
Factor and Solve | Negative | Positive (ITRAN(3) = 1) |
Factor Only | Positive | Negative (ITRAN(3) = -1) |
Solve Only | Negative | Positive (ITRAN(3) = 1) |
A general sparse matrix A, stored in diagonal-out or profile-in skyline storage mode is converted to either of these same two storage modes. (Generally, you convert from one to the other, but the capability exists to specify the same storage mode for input and output.) The argument ITRAN(3) indicates the direction in which you want the transformation performed on matrix A, allowing you to optimize your performance in this subroutine. This is especially beneficial for large matrices.
This subroutine is meant to be used in conjunction with DGKFS and DGKFSP, which process matrices stored in these skyline storage modes.
Error 2015 is unrecoverable, naux = 0, and unable to allocate work area.
None
This example shows how to convert a 9 by 9 general sparse matrix A from diagonal-out skyline storage mode to profile-in skyline storage mode. Matrix A is:
* * | 11.0 12.0 13.0 0.0 0.0 0.0 0.0 0.0 0.0 | | 21.0 22.0 23.0 24.0 25.0 0.0 0.0 0.0 29.0 | | 31.0 32.0 33.0 34.0 35.0 0.0 37.0 0.0 39.0 | | 41.0 42.0 43.0 44.0 45.0 46.0 47.0 0.0 49.0 | | 0.0 0.0 0.0 54.0 55.0 56.0 57.0 58.0 59.0 | | 0.0 62.0 63.0 64.0 65.0 66.0 67.0 68.0 69.0 | | 0.0 0.0 0.0 74.0 75.0 76.0 77.0 78.0 79.0 | | 0.0 0.0 0.0 84.0 85.0 86.0 87.0 88.0 89.0 | | 91.0 92.0 93.0 94.0 95.0 96.0 97.0 98.0 99.0 | * *
Assuming that DGKFS last performed a solve on matrix A, the direction of the transformation is positive; that is, ITRAN(3) is 1. This provides the best performance here.
N AU NU IDU AL NL IDL ITRAN AUX NAUX | | | | | | | | | | CALL DGKTRN( 9 , AU , 33 , IDU , AL , 35 , IDL , ITRAN , AUX , 18
AU = (11.0, 22.0, 12.0, 33.0, 23.0, 13.0, 44.0, 34.0, 24.0, 55.0, 45.0, 35.0, 25.0, 66.0, 56.0, 46.0, 77.0, 67.0, 57.0, 47.0, 37.0, 88.0, 78.0, 68.0, 58.0, 99.0, 89.0, 79.0, 69.0, 59.0, 49.0, 39.0, 29.0) IDU = (1, 2, 4, 7, 10, 14, 17, 22, 26, 34) AL = ( . , . , 21.0, . , 32.0, 31.0, . , 43.0, 42.0, 41.0, . , 54.0, . , 65.0, 64.0, 63.0, 62.0, . , 76.0, 75.0, 74.0, . , 87.0, 86.0, 85.0, 84.0, . , 98.0, 97.0, 96.0, 95.0, 94.0, 93.0, 92.0, 91.0) IDL = (1, 2, 4, 7, 11, 13, 18, 22, 27, 36) ITRAN = (0, 1, 1)
AU = (11.0, 12.0, 22.0, 13.0, 23.0, 33.0, 24.0, 34.0, 44.0, 25.0, 35.0, 45.0, 55.0, 46.0, 56.0, 66.0, 37.0, 47.0, 57.0, 67.0, 77.0, 58.0, 68.0, 78.0, 88.0, 29.0, 39.0, 49.0, 59.0, 69.0, 79.0, 89.0, 99.0) IDU = (1, 3, 6, 9, 13, 16, 21, 25, 33, 34) AL = ( . , 21.0, . , 31.0, 32.0, . , 41.0, 42.0, 43.0, . , 54.0, . , 62.0, 63.0, 64.0, 65.0, . , 74.0, 75.0, 76.0, . , 84.0, 85.0, 86.0, 87.0, . , 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, . ) IDL = (1, 3, 6, 10, 12, 17, 21, 26, 35, 36)
This example shows how to convert the same 9 by 9 general sparse matrix A in Example 1 from profile-in skyline storage mode to diagonal-out skyline storage mode.
Assuming that DGKFS last performed a factorization on matrix A, the direction of the transformation is negative; that is, ITRAN(3) is -1. This provides the best performance here.
N AU NU IDU AL NL IDL ITRAN AUX NAUX | | | | | | | | | | CALL DGKTRN( 9 , AU , 33 , IDU , AL , 35 , IDL , ITRAN , AUX , 18