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

OUTPUT PARAMETERS:

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 DO
For 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 DO
The 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.