PURPOSE
Compute the quadratic form {X}T[D]{X} (symmetric) or {X}T[D]{Y} (nonsymmetric) where [D] is a diagonal matrix. Store the result in matrix [F] according to the FMS Parameter IACCUM[F] = [F] - {X}T[D]{Y}, IACCUM = -1, [F] = {X}T[D]{Y}, IACCUM = 0, (default) [F] = [F] + {X}T[D]{Y}, IACCUM = +1.For symmetric problems, {Y} = {X}.
SYNOPSIS
CALL RSDDVM (LUX, LUD, F, NUMXY)
CALL RNDDVM (LUX, LUD, LUY, F, NUMX, NUMY)
CALL CHDDVM (LUX, LUD, F, NUMXY)
CALL CSDDVM (LUX, LUD, F, NUMXY)
CALL CNDDVM (LUX, LUD, LUY, F, NUMX, NUMY)
INPUT PARAMETERS
- LUX(25) = Integer array.
File attributes for the {X} vectors. - LUD(25) = Integer array.
File attributes for the diagonal [D], stored as a vector file. - LUY(25) = Integer array. (RNDDVM, CNDDVM only)
File attributes for the {Y} vectors. If LUY is the same as LUX, the symmetric version of this subroutine should be called to compute [F] more rapidly. - NUMXY = Integer. (RSDDVM, CHDDVM, CSDDVM only)
Number of {X} vectors. - NUMX = Integer. (RNDDVM, CNDDVM only)
Number of {X} vectors. - NUMY = Integer. (RNDDVM, CNDDVM only)
Number of {Y} vectors.
OUTPUT PARAMETERS:
- F(NUMXY*(NUMXY+1)/2) = Real array (RSDDVM).
F(NUMX, NUMY) = Real array (RNDDVM).
F(NUMXY*(NUMXY+1)/2) = Complex array (CHDDVM, CSDDVM).
F(NUMX, NUMY) = Complex array (CNDDVM).
This array contains the matrix formed from the quadratic form {X}T[D]{X} (symmetric) or {X}T[D]{Y} (nonsymmetric). For symmetric problems (RSDDVM, CHDDVM, CSDDVM) this array is stored in lower triangular form, starting from column 1 through the diagonal by increasing row number. For nonsymmetric problems (RNDDVM, CNDDVM) this array is stored in standard FORTRAN storage.
FMS PARAMETERS:
The following FMS Parameters are especially important to this routine:Parameter | Description |
---|---|
IACCUM | Product accumulation flag
= -1, [F] = [F] - {X}T[D]{Y}, = 0, [F] = {X}T[D]{Y}, (default) = +1, [F] = [F] + {X}T[D]{Y}, |
IPRDV | Vectors-diagonal-vectors multiply print code |
DESCRIPTION:
For symmetric problems, this subroutine forms the lower triangular matrix [F] from the quadratic form {X}T[D]{X}. The {X} vectors are supplied on file LUX and the diagonal on file LUD. The matrix [F] is stored in a packed triangular format similar to submatrix type 4 described in the call to FMSOS. The calculation performed is equivalent to the following FORTRAN statements:L = 0 DO I = 1,NUMXY DO J = l,I L = L + 1 F(L) = 0. DO K = 1,NUMEQ F(L) = F(L) + X(K,I)*D(K,K)*Y(K,J) END DO END DO END DOFor nonsymmetric problems, this subroutine forms a full matrix [F] from the quadratic form {X}T[D]{Y}. The vector groups {X} and {Y} are supplied on the files LUX and LUY and the diagonal on file LUD. The matrix [F] is stored in standard FORTRAN storage for F(NUMX, NUMY). The calculation performed is equivalent to the following FORTRAN statements:
DO I = 1,NUMX DO J = 1,NUMY F(I,J) = 0 . DO K = 1,NUMEQ F(I,J) = F(I,J) + X(K,I)*D(K,K)*Y(K,J) END DO END DO END DOThe vectors-diagonal-vectors calculation provides an efficient and convenient way to evaluate quadratic forms when the matrix is diagonal.
The array [F] must be aligned on a natural address boundary.