Télécharger chicmp.eso

Retour à la liste

Numérotation des lignes :

chicmp
  1. C CHICMP SOURCE CHAT 05/01/12 21:57:00 5004
  2. SUBROUTINE CHICMP(NVCOMP,IDSCHI)
  3. IMPLICIT INTEGER(I-N)
  4. IMPLICIT REAL*8 (A-H,O-Z)
  5. C -------------------------------------------------------------------
  6. C
  7. C AJOUT DE NOUVELLES COMPOSANTES ( CHIMIE)
  8. C
  9. C -------------------------------------------------------------------
  10. -INC SMTABLE
  11. -INC SMLENTI
  12. POINTEUR MLIDEN.MLENTI,MLXMX.MLENTI
  13.  
  14. -INC PPARAM
  15. -INC CCOPTIO
  16. SEGMENT IDSCHI
  17. REAL*8 GK(NYDIM),AA(NYDIM,NXDIM),FF(NZDIM,NPDIM)
  18. INTEGER IDX(NXDIM),IDY(NYDIM),IDZ(NZDIM),IDP(NPDIM),NN(6)
  19. INTEGER IDECY(NYDIM),IONZ(NXDIM)
  20. CHARACTER*32 NAME(NXDIM),NAMESP(NYDIM)
  21. ENDSEGMENT
  22. CHARACTER*8 MTYPI,CHARI,MTYPR,CHARR
  23. CHARACTER*32 CHARM
  24. LOGICAL LOGRE
  25. INTEGER LINIT
  26. C
  27. NYDIM=IDY(/1)
  28. NXDIM=IDX(/1)
  29. NZDIM=IDZ(/1)
  30. NPDIM=IDP(/1)
  31. MTAB1=NVCOMP
  32. SEGACT MTAB1
  33. NNCOMP= MTAB1.MLOTAB
  34. NICOMP=NNCOMP
  35. IVALI=0
  36. XVALI=0.D0
  37. IRETI=0
  38. IVALR=0
  39. XVALR=0.D0
  40. IRETR=0
  41. MTYPI='MOT '
  42. MTYPR=' '
  43. CHARR=' '
  44. CALL ACCTAB(MTAB1,MTYPI,IVALI,XVALI,'CLASSE',.TRUE.,IRETI,
  45. * MTYPR,IVALR,XVALR,CHARR,LOGRE,IRETR)
  46. IF(IERR.NE.0)RETURN
  47. SEGACT MTAB1
  48. IF(MTYPR.EQ.'MOT ')THEN
  49. C
  50. C on a trouvé CLASSE c'est un OBJET on va compter les indices entier
  51. C
  52. NICOMP= 0
  53. DO 5 IESP=1,NNCOMP
  54. IF((MTAB1.MTABTI(IESP)).EQ.'ENTIER') NICOMP= NICOMP+1
  55. 5 CONTINUE
  56. ENDIF
  57. DO 50 ICOMP=1,NICOMP
  58. IVALI=ICOMP
  59. XVALI=0.D0
  60. IRETI=0
  61. IVALR=0
  62. XVALR=0.D0
  63. IRETR=0
  64. MTYPI='ENTIER '
  65. MTYPR=' '
  66. CHARR=' '
  67. CHARI=' '
  68. CALL ACCTAB(MTAB1,MTYPI,IVALI,XVALI,CHARI,.TRUE.,IRETI,
  69. *MTYPR,IVALR,XVALR,CHARR,LOGRE,IRETR)
  70. IF(IERR.NE.0)RETURN
  71. SEGACT MTAB1
  72. IF((MTYPR.EQ.'TABLE ').OR.(MTYPR.EQ.'OBJET ')) THEN
  73. MTAB2=IRETR
  74. SEGACT MTAB2
  75. NXDIM=NXDIM+1
  76. NYDIM=NYDIM+1
  77. SEGADJ IDSCHI
  78. IVALI=1
  79. XVALI=0.D0
  80. IRETI=0
  81. IVALR=0
  82. XVALR=0.D0
  83. IRETR=0
  84. MTYPI='MOT '
  85. MTYPR='ENTIER '
  86. CHARR=' '
  87. CALL ACCTAB(MTAB2,MTYPI,IVALI,XVALI,'IDEN',.TRUE.,IRETI,
  88. *MTYPR,IVALR,XVALR,CHARR,LOGRE,IRETR)
  89. IF(IERR.NE.0)RETURN
  90. SEGACT MTAB1
  91. NVIDEN=IVALR
  92. IVALI=1
  93. XVALI=0.D0
  94. IRETI=0
  95. IVALR=0
  96. XVALR=0.D0
  97. IRETR=0
  98. MTYPI='MOT '
  99. MTYPR='MOT '
  100. CHARM=' '
  101. CALL ACCTAB(MTAB2,MTYPI,IVALI,XVALI,'NOM',.TRUE.,IRETI,
  102. * MTYPR,IVALR,XVALR,CHARM,LOGRE,IRETR)
  103. SEGACT MTAB1
  104. IF(IERR.NE.0)RETURN
  105. NAME(NXDIM)=CHARM
  106. IVALI=1
  107. XVALI=0.D0
  108. IRETI=0
  109. IVALR=0
  110. XVALR=0.D0
  111. IRETR=0
  112. MTYPI='MOT '
  113. MTYPR='ENTIER '
  114. CHARR=' '
  115. CALL ACCTAB(MTAB2,MTYPI,IVALI,XVALI,'CHARGE',.TRUE.,
  116. *IRETI,MTYPR,IVALR,XVALR,CHARR,LOGRE,IRETR)
  117. IF(IERR.NE.0)RETURN
  118. SEGACT MTAB1
  119. IONZ(NXDIM)=IVALR
  120. NN(6)=NN(6)+1
  121. IDY(NYDIM)=NVIDEN
  122. LINIT=6
  123. CALL CHIREX(IDSCHI,NVIDEN,LINIT,1)
  124. AA(NN(1),NXDIM)=1.D0
  125. IDX(NXDIM)=NVIDEN
  126. GK(NN(1))=0.D0
  127. SEGDES MTAB2
  128. ELSE
  129. MOTERR(1:40)='******** NVCOMP ??????????? '
  130. CALL ERREUR(-301)
  131. CALL ERREUR(21)
  132. RETURN
  133. ENDIF
  134. 50 CONTINUE
  135. SEGDES MTAB1
  136. C WRITE(6,*)' FIN CHICMP NXDIM NYDIM' ,NXDIM,NYDIM
  137. C WRITE(6,*)(NAME(I),I=1,NXDIM)
  138. C WRITE(6,*)'IDX',(IDX(I),I=1,NXDIM)
  139. C WRITE(6,*)'IDY',(IDY(I),I=1,NYDIM)
  140. C WRITE(6,*)'GK',(GK(I),I=1,NYDIM)
  141. C WRITE(6,110)((AA(I,J),I=1,NYDIM),J=1,NXDIM)
  142. 110 FORMAT( 2X ,'AA',(10(1PE10.3)))
  143.  
  144.  
  145.  
  146. RETURN
  147. END
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  

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