Télécharger elfli1.eso

Retour à la liste

Numérotation des lignes :

  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. -INC CCOPTIO
  33. DIMENSION C1(*),C2(*),C3(N,1),C4(N,1),B(*),IS(1),NLBLI(2,1)
  34. C -1
  35. C 1 - A4 = A4 * A2
  36. C
  37. C WRITE(IOIMP,*) ' A4 * A2-1 '
  38. DO 20 I=1,N
  39. NB=0
  40. DO 10 NBL=1,NBLI
  41. NX1=NLBLI(1,NBL)
  42. NX2=NLBLI(2,NBL)
  43. IF(NX1.EQ.NX2) THEN
  44. C4(I,NX1+1)=C2(NB+1)*C4(I,NX1+1)
  45. C4(I,NX1+2)=C2(NB+2)*C4(I,NX1+2)
  46. C4(I,NX1+3)=C2(NB+3)*C4(I,NX1+3)
  47. C4(I,NX1+4)=C2(NB+4)*C4(I,NX1+4)
  48. C4(I,NX1+5)=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,NX1+6)
  71. * +C2(NB+33)*C4(I,NX2+2)+C2(NB+40)*C4(I,NX2+6)
  72. C
  73. C4(I,NX1+1)=B( 1)
  74. C4(I,NX1+2)=B( 2)
  75. C4(I,NX1+3)=B( 3)
  76. C4(I,NX1+4)=B( 4)
  77. C4(I,NX1+5)=B( 5)
  78. C4(I,NX1+6)=B( 6)
  79. C4(I,NX2+1)=B( 7)
  80. C4(I,NX2+2)=B( 8)
  81. C4(I,NX2+3)=B( 9)
  82. C4(I,NX2+4)=B(10)
  83. C4(I,NX2+5)=B(11)
  84. C4(I,NX2+6)=B(12)
  85. C WRITE(IOIMP,*) I
  86. C WRITE(IOIMP,1000) (C4(I,NX1+K),K=1,6),(C4(I,NX2+K),K=1,6)
  87. C1000 FORMAT(12(1X,1PE10.3))
  88. NB=NB+40
  89. ENDIF
  90. 10 CONTINUE
  91. 20 CONTINUE
  92. C -1
  93. C 2 - A3 = A3 - A4 * A2 * A1
  94. C
  95. C WRITE(IOIMP,*) ' A3-A4 * A2-1 *A1 '
  96. DO 40 I=1,N
  97. NA=0
  98. DO 30 NBL=1,NBLI
  99. NX1=NLBLI(1,NBL)
  100. NX2=NLBLI(2,NBL)
  101. NX=NX1
  102. IF(NX1.EQ.NX2) THEN
  103. C3(I,NX+1)=C3(I,NX+1)-C1(NA+1)*C4(I,NX+1)
  104. C3(I,NX+2)=C3(I,NX+2)-C1(NA+2)*C4(I,NX+2)-C1(NA+9)*C4(I,NX+6)
  105. C3(I,NX+3)=C3(I,NX+3)-C1(NA+4)*C4(I,NX+3)-C1(NA+7)*C4(I,NX+5)
  106. C3(I,NX+4)=C3(I,NX+4)-C1(NA+6)*C4(I,NX+4)
  107. C3(I,NX+5)=C3(I,NX+5)-C1(NA+5)*C4(I,NX+3)-C1(NA+8)*C4(I,NX+5)
  108. C3(I,NX+6)=C3(I,NX+6)-C1(NA+3)*C4(I,NX+2)-C1(NA+10)*C4(I,NX+6)
  109. NA=NA+10
  110. ELSE
  111. C3(I,NX+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1(NA+35)*C4(I,NX2+3)-C1(NA+38)*C4(I,NX2+5)
  129. C3(I,NX2+6)=C3(I,NX2+6)-C1(NA+13)*C4(I,NX+2)-C1(NA+20)*C4(I,NX+6)
  130. * -C1(NA+33)*C4(I,NX2+2)-C1(NA+40)*C4(I,NX2+6)
  131. C WRITE(IOIMP,*) I
  132. C WRITE(IOIMP,1000) (C3(I,NX1+K),K=1,6),(C3(I,NX2+K),K=1,6)
  133. NA=NA+40
  134. ENDIF
  135. 30 CONTINUE
  136. 40 CONTINUE
  137. C DO 35 I=1,N
  138. C WRITE(6,1002) (C3(I,J),J=1,N)
  139. C1002 FORMAT(12(1X,1PE10.3))
  140. C 35 CONTINUE
  141. C
  142. C -1
  143. C 3 - C3 = A3
  144. C
  145. CALL INVER(C3,N,ISING,B,IS,EPS)
  146. IF(ISING.EQ.1) RETURN
  147. C -1 -1
  148. C 2 - C4 = A3 * A4 * A2
  149. C
  150. DO 80 J=1,N
  151. DO 60 I=1,N
  152. AA=0.D0
  153. DO 50 K=1,N
  154. AA=AA+C3(I,K)*C4(K,J)
  155. 50 CONTINUE
  156. B(I)=AA
  157. 60 CONTINUE
  158. DO 70 I=1,N
  159. C4(I,J)=B(I)
  160. 70 CONTINUE
  161. 80 CONTINUE
  162. C
  163. RETURN
  164. END
  165.  
  166.  

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