coefmat.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\coefmat.f
00002 !
00048                      SUBROUTINE COEFMAT
00049 !                    ******************
00050 !
00051      &(PERIAF,DT,M,AM,NPERIAF)
00052 !
00053 !***********************************************************************
00054 ! TELEMAC2D   V6P1                                   21/08/2010
00055 !***********************************************************************
00056 !
00057 !
00058 !reference  "SIMULATION DES COURANTS DE MAREE EN MANCHE ET PROCHE ATLANTIQUE",
00059 !+                       EDF REPORT, J. M. JANIN ET. AL., PP 27-28.
00060 !
00061 !
00062 !
00063 !
00064 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00065 !| AM             |<->| (2NPERIAF*2NPERIAF) COEFFICIENT MATRIX,
00066 !| DT             |-->| TIME INTERVAL.
00067 !| M              |-->| NUMBER OF SAMPLING POINTS
00068 !| NPERIAF        |-->| NUMBER OF WAVES
00069 !| PERIAF         |-->| PERIOD OF WAVES.
00070 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00071 !
00072       IMPLICIT NONE
00073       INTEGER LNG,LU
00074       COMMON/INFO/LNG,LU
00075 !
00076 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00077 !
00078       INTEGER,          INTENT(IN   ) :: NPERIAF,M
00079       DOUBLE PRECISION, INTENT(IN   ) :: DT,PERIAF(NPERIAF)
00080       DOUBLE PRECISION, INTENT(INOUT) :: AM(2*NPERIAF,2*NPERIAF)
00081 !
00082 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00083 !
00084 !                        500>NPERIAF
00085       DOUBLE PRECISION W(500),PI
00086       DOUBLE PRECISION A,B,C,D,AA,BB
00087       INTEGER I,J
00088 !
00089       INTRINSIC COS,SIN,ACOS
00090 !
00091 !-----------------------------------------------------------------------
00092 !
00093       PI = ACOS(-1.D0)
00094 !
00095       DO I = 1, NPERIAF
00096         W(I)=2.D0*PI/PERIAF(I)
00097       ENDDO
00098 !
00099       DO I = 1, NPERIAF
00100         DO J = 1, NPERIAF
00101           AA = (W(I)+W(J))*DT
00102           BB = (W(I)-W(J))*DT
00103           A = (-1.D0+COS(AA)+COS(M*AA)-COS((M+1)*AA))/(2-2*COS(AA))
00104           C = (SIN(AA)+SIN(M*AA)-SIN((M+1)*AA))/(2-2*COS(AA))
00105           IF(I.EQ.J) THEN
00106             B = M*1.D0
00107             D = 0.D0
00108           ELSE
00109             B = (-1+COS(BB)+COS(M*BB)-COS((M+1)*BB))/(2-2*COS(BB))
00110             D = (SIN(BB)+SIN(M*BB)-SIN((M+1)*BB))/(2-2*COS(BB))
00111           ENDIF
00112           AM(I,J) = (A+B)/(2*M)
00113           AM(I,NPERIAF+J) = (C-D)/(2*M)
00114           AM(I+NPERIAF,J) = (C+D)/(2*M)
00115           AM(I+NPERIAF,NPERIAF+J) = (B-A)/(2*M)
00116         ENDDO
00117       ENDDO
00118 !
00119 !-----------------------------------------------------------------------
00120 !
00121       RETURN
00122       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0