Télécharger elfli1.eso

Retour à la liste

Numérotation des lignes :

elfli1
  1. C ELFLI1 SOURCE CHAT 05/01/12 23:32:09 5004
  2. SUBROUTINE ELFLI1(C1,C2,C3,C4,N,B,IS,ISING,EPS,NLBLI,NBLI)
  3. IMPLICIT INTEGER(I-N)
  4. IMPLICIT REAL*8(A-H,O-Z)
  5. C
  6. C =====================================================================
  7. C SOUS-PROGRAMME FORTRAN APPELE PAR ELFLIA
  8. C CALCUL DES MATRICES C3 ET C4 DE DIMENSION N
  9. C
  10. C EN ENTREE :
  11. C
  12. C C1 MATRICE BANDE A1
  13. C -1
  14. C C2 MATRICE BANDE A2
  15. C C3 MATRICE A3
  16. C C4 MATRICE A4
  17. C B,IS TABLEAU DE TRAVAIL POUR L'INVERSION
  18. C ISING = 1 SI MATRICE SINGULIERE 0 SINON
  19. C EPS PRECISION
  20. C NLBLI TABLEAU POUR L'UTILISATION DES MATRICES BANDES
  21. C
  22. C EN SORTIE :
  23. C -1 -1
  24. C C3 MATRICE (A3-A4*A2 *A1)
  25. C -1 -1 -1
  26. C C4 MATRICE (A3-A4*A2 *A1) *A4*A2
  27. C
  28. C CREATION : 04/08/87
  29. C PROGRAMMEUR : GUILBAUD
  30. C =====================================================================
  31. C
  32.  
  33. -INC PPARAM
  34. -INC CCOPTIO
  35. DIMENSION C1(*),C2(*),C3(N,1),C4(N,1),B(*),IS(1),NLBLI(2,1)
  36. C -1
  37. C 1 - A4 = A4 * A2
  38. C
  39. C WRITE(IOIMP,*) ' A4 * A2-1 '
  40. DO 20 I=1,N
  41. NB=0
  42. DO 10 NBL=1,NBLI
  43. NX1=NLBLI(1,NBL)
  44. NX2=NLBLI(2,NBL)
  45. IF(NX1.EQ.NX2) THEN
  46. C4(I,NX1+1)=C2(NB+1)*C4(I,NX1+1)
  47. C4(I,NX1+2)=C2(NB+2)*C4(I,NX1+2)
  48. C4(I,NX1+3)=C2(NB+3)*C4(I,NX1+3)
  49. C4(I,NX1+4)=C2(NB+4)*C4(I,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I,NX1+2)+C2(NB+20)*C4(I,NX1+6)
  73. * +C2(NB+33)*C4(I,NX2+2)+C2(NB+40)*C4(I,NX2+6)
  74. C
  75. C4(I,NX1+1)=B( 1)
  76. C4(I,NX1+2)=B( 2)
  77. C4(I,NX1+3)=B( 3)
  78. C4(I,NX1+4)=B( 4)
  79. C4(I,NX1+5)=B( 5)
  80. C4(I,NX1+6)=B( 6)
  81. C4(I,NX2+1)=B( 7)
  82. C4(I,NX2+2)=B( 8)
  83. C4(I,NX2+3)=B( 9)
  84. C4(I,NX2+4)=B(10)
  85. C4(I,NX2+5)=B(11)
  86. C4(I,NX2+6)=B(12)
  87. C WRITE(IOIMP,*) I
  88. C WRITE(IOIMP,1000) (C4(I,NX1+K),K=1,6),(C4(I,NX2+K),K=1,6)
  89. C1000 FORMAT(12(1X,1PE10.3))
  90. NB=NB+40
  91. ENDIF
  92. 10 CONTINUE
  93. 20 CONTINUE
  94. C -1
  95. C 2 - A3 = A3 - A4 * A2 * A1
  96. C
  97. C WRITE(IOIMP,*) ' A3-A4 * A2-1 *A1 '
  98. DO 40 I=1,N
  99. NA=0
  100. DO 30 NBL=1,NBLI
  101. NX1=NLBLI(1,NBL)
  102. NX2=NLBLI(2,NBL)
  103. NX=NX1
  104. IF(NX1.EQ.NX2) THEN
  105. C3(I,NX+1)=C3(I,NX+1)-C1(NA+1)*C4(I,NX+1)
  106. C3(I,NX+2)=C3(I,NX+2)-C1(NA+2)*C4(I,NX+2)-C1(NA+9)*C4(I,NX+6)
  107. C3(I,NX+3)=C3(I,NX+3)-C1(NA+4)*C4(I,NX+3)-C1(NA+7)*C4(I,NX+5)
  108. C3(I,NX+4)=C3(I,NX+4)-C1(NA+6)*C4(I,NX+4)
  109. C3(I,NX+5)=C3(I,NX+5)-C1(NA+5)*C4(I,NX+3)-C1(NA+8)*C4(I,NX+5)
  110. C3(I,NX+6)=C3(I,NX+6)-C1(NA+3)*C4(I,NX+2)-C1(NA+10)*C4(I,NX+6)
  111. NA=NA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A+18)*C4(I,NX+5)
  130. * -C1(NA+35)*C4(I,NX2+3)-C1(NA+38)*C4(I,NX2+5)
  131. C3(I,NX2+6)=C3(I,NX2+6)-C1(NA+13)*C4(I,NX+2)-C1(NA+20)*C4(I,NX+6)
  132. * -C1(NA+33)*C4(I,NX2+2)-C1(NA+40)*C4(I,NX2+6)
  133. C WRITE(IOIMP,*) I
  134. C WRITE(IOIMP,1000) (C3(I,NX1+K),K=1,6),(C3(I,NX2+K),K=1,6)
  135. NA=NA+40
  136. ENDIF
  137. 30 CONTINUE
  138. 40 CONTINUE
  139. C DO 35 I=1,N
  140. C WRITE(6,1002) (C3(I,J),J=1,N)
  141. C1002 FORMAT(12(1X,1PE10.3))
  142. C 35 CONTINUE
  143. C
  144. C -1
  145. C 3 - C3 = A3
  146. C
  147. CALL INVER(C3,N,ISING,B,IS,EPS)
  148. IF(ISING.EQ.1) RETURN
  149. C -1 -1
  150. C 2 - C4 = A3 * A4 * A2
  151. C
  152. DO 80 J=1,N
  153. DO 60 I=1,N
  154. AA=0.D0
  155. DO 50 K=1,N
  156. AA=AA+C3(I,K)*C4(K,J)
  157. 50 CONTINUE
  158. B(I)=AA
  159. 60 CONTINUE
  160. DO 70 I=1,N
  161. C4(I,J)=B(I)
  162. 70 CONTINUE
  163. 80 CONTINUE
  164. C
  165. RETURN
  166. END
  167.  
  168.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales