C.hr DGMADD
C@
C....*...1.........2.........3.........4.........5.........6.........7.*
C     DGMADD  10/16/71
C
C     PURPOSE
C     ADD TWO MATRICES: R = A + B
C
C     USAGE
C     CALL DGMADD(A,B,R,N,M)
C
C     ARGUMENTS
C     A - INPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     B - INPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     R - OUTPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     N - NUMBER OF ROWS IN A, B, AND R
C         INTEGER*4
C     M - NUMBER OF COLUMNS IN A, B, AND R
C         INTEGER*4
C
      SUBROUTINE DGMADD(A,B,R,N,M)
      implicit real*8 (a-h,o-z)
      save
      REAL*8 A(N*M),B(N*M),R(N*M)
      NM=N*M
      DO 10 I=1,NM
10    R(I)=A(I)+B(I)
      RETURN
      END
