Télécharger opchpi.eso

Retour à la liste

Numérotation des lignes :

  1. C OPCHPI SOURCE CB215821 16/06/16 10:38:32 8972
  2.  
  3. SUBROUTINE OPCHPi(ithr)
  4. C Cette subroutine est l'interface de calcul sur les CHPOINTS
  5. C Elle peut etre appelee en parallele
  6.  
  7.  
  8. C Creation 07/12/2015
  9. C Createur CB215821
  10. C Historique des Corrections apportees :
  11. C -
  12. C -
  13. C -
  14.  
  15. C Elle realise les operations suivantes :
  16.  
  17. C IOPE = 1 PUISSANCE
  18. C = 2 PRODUIT
  19. C = 3 ADDITION
  20. C = 4 SOUSTRACTION
  21. C = 5 DIVISION
  22. C = 6 COSINUS
  23. C = 7 SINUS
  24. C = 8 TANGENTE
  25. C = 9 ARCOSINUS
  26. C = 10 ARCSINUS
  27. C = 11 ARCTANGENTE
  28. C = 12 EXPONENTIELLE
  29. C = 13 LOGARITHME
  30. C = 14 VALEUR ABSOLUE
  31. C = 15 COSINUS HYPERBOLIQUE
  32. C = 16 SINUS HYPERBOLIQUE
  33. C = 17 TANGENTE HYPERBOLIQUE
  34. C = 18 ERF FONCTION D'ERRREUR DE GAUSS
  35. C = 19 ERFC FONCTION D'ERRREUR complementaire DE GAUSS (1-erf(x))
  36. C = 20 ARGCH (Fonction reciproque de COSH)
  37. C = 21 ARGSH (Fonction reciproque de SINH)
  38. C = 22 ARGTH (Fonction reciproque de TANH)
  39.  
  40. C IARG = 0 ==> ARGUMENT I1I et X1I INUTILISES
  41. C IARG = 1 ==> ARGUMENT I1I UTILISE
  42. C IARG = 2 ==> ARGUMENT X1I UTILISE
  43.  
  44. IMPLICIT INTEGER(I-N)
  45. IMPLICIT REAL*8 (A-H,O-Z)
  46.  
  47.  
  48. -INC PPARAM
  49. -INC CCOPTIO
  50. -INC SMCHPOI
  51. -INC CCREEL
  52.  
  53. C Declaration du COMMON pour le travail en parallele
  54. COMMON/opchpc/NBTHR,IPOIN,IPOIN1,IERR1,NSOUPO,IOPE,IARG,I1I,X1I
  55.  
  56. SEGMENT SERROR
  57. LOGICAL BERROR(NBTHR)
  58. ENDSEGMENT
  59.  
  60. MCHPOI = IPOIN
  61. MCHPO1 = IPOIN1
  62. SERROR = IERR1
  63.  
  64. I2 = I1I
  65. IARG2=IARG
  66.  
  67. GOTO ( 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,
  68. & 18,19,20,21,22 ),IOPE
  69. C Erreur si l'operation demandee n'est pas encore possible
  70. CALL ERREUR(21)
  71. RETURN
  72.  
  73. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  74. C PUISSANCE
  75. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  76. 1 CONTINUE
  77. IF (IARG2 .EQ. 1) THEN
  78. C PUISSANCE ENTIERE
  79.  
  80. DO 101 IA=1,NSOUPO
  81. MSOUPO=MCHPOI.IPCHP(IA)
  82. MSOUP1=MCHPO1.IPCHP(IA)
  83. MPOVAL=MSOUPO.IPOVAL
  84. MPOVA1=MSOUP1.IPOVAL
  85. N =MPOVAL.VPOCHA(/1)
  86. NC=MPOVAL.VPOCHA(/2)
  87.  
  88. IRES = MOD(N,NBTHR)
  89. IF (IRES .EQ. 0) THEN
  90. ILON = N / NBTHR
  91. IDEB = (ithr -1)* ILON + 1
  92. ELSE
  93. IF (ithr .LE. IRES) THEN
  94. ILON = (N / NBTHR) + 1
  95. IDEB = (ithr -1)* ILON + 1
  96. ELSE
  97. ILON = N / NBTHR
  98. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  99. ENDIF
  100. ENDIF
  101. IFIN = IDEB + ILON - 1
  102. DO 101 IC=1,NC
  103. DO 101 IB = IDEB,IFIN
  104. XTRA=MPOVA1.VPOCHA(IB,IC)
  105. IF(ABS(XTRA).LT.XPETIT .AND. I2.LT.0)THEN
  106. SERROR.BERROR(ithr) = .TRUE.
  107. RETURN
  108. ELSE
  109. MPOVAL.VPOCHA(IB,IC)=XTRA ** I2
  110. ENDIF
  111. 101 CONTINUE
  112. RETURN
  113.  
  114. ELSE
  115. C PUISSANCE FLOTTANT
  116. C Verification si puissance ENTIERE possible
  117. I2 = NINT(X1I)
  118. XFLOT = ABS(X1I - REAL(I2))
  119.  
  120. IF ( XFLOT .LE. (XZPREC*ABS(X1I)*REAL(2.D0))) THEN
  121. IARG2=1
  122. GOTO 1
  123. ENDIF
  124.  
  125. C Verification si SQRT possible
  126. XFLOT = ABS(X1I - REAL(0.5D0))
  127. IF (XFLOT .LE. (XZPREC*ABS(X1I)*REAL(2.D0))) THEN
  128. C RACINE CARREE
  129. DO 102 IA=1,NSOUPO
  130. MSOUPO=MCHPOI.IPCHP(IA)
  131. MSOUP1=MCHPO1.IPCHP(IA)
  132. MPOVAL=MSOUPO.IPOVAL
  133. MPOVA1=MSOUP1.IPOVAL
  134. N =MPOVAL.VPOCHA(/1)
  135. NC=MPOVAL.VPOCHA(/2)
  136.  
  137. IRES = MOD(N,NBTHR)
  138. IF (IRES .EQ. 0) THEN
  139. ILON = N / NBTHR
  140. IDEB = (ithr -1)* ILON + 1
  141. ELSE
  142. IF (ithr .LE. IRES) THEN
  143. ILON = (N / NBTHR) + 1
  144. IDEB = (ithr -1)* ILON + 1
  145. ELSE
  146. ILON = N / NBTHR
  147. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  148. ENDIF
  149. ENDIF
  150. IFIN = IDEB + ILON - 1
  151. DO 102 IC=1,NC
  152. DO 102 IB = IDEB,IFIN
  153. XFLO = MPOVA1.VPOCHA(IB,IC)
  154. IF (XFLO .LT. REAL(0.D0)) THEN
  155. SERROR.BERROR(ithr) = .TRUE.
  156. RETURN
  157. ELSE
  158. MPOVAL.VPOCHA(IB,IC)=SQRT(MPOVA1.VPOCHA(IB,IC))
  159. ENDIF
  160. 102 CONTINUE
  161. RETURN
  162. ELSE
  163. C CAS GENERAL
  164. DO 103 IA=1,NSOUPO
  165. MSOUPO=MCHPOI.IPCHP(IA)
  166. MSOUP1=MCHPO1.IPCHP(IA)
  167. MPOVAL=MSOUPO.IPOVAL
  168. MPOVA1=MSOUP1.IPOVAL
  169. N =MPOVAL.VPOCHA(/1)
  170. NC=MPOVAL.VPOCHA(/2)
  171.  
  172. IRES = MOD(N,NBTHR)
  173. IF (IRES .EQ. 0) THEN
  174. ILON = N / NBTHR
  175. IDEB = (ithr -1)* ILON + 1
  176. ELSE
  177. IF (ithr .LE. IRES) THEN
  178. ILON = (N / NBTHR) + 1
  179. IDEB = (ithr -1)* ILON + 1
  180. ELSE
  181. ILON = N / NBTHR
  182. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  183. ENDIF
  184. ENDIF
  185. IFIN = IDEB + ILON - 1
  186. DO 103 IC=1,NC
  187. DO 103 IB = IDEB,IFIN
  188. XFLO = MPOVA1.VPOCHA(IB,IC)
  189. IF ((ABS(XFLO) .LE. XPETIT) .AND.
  190. & (X1I.LT. REAL(0.D0))) THEN
  191. SERROR.BERROR(ithr) = .TRUE.
  192. RETURN
  193. ELSEIF (XFLO .LT. REAL(0.D0)) THEN
  194. SERROR.BERROR(ithr) = .TRUE.
  195. RETURN
  196. ELSE
  197. MPOVAL.VPOCHA(IB,IC)=XFLO ** X1I
  198. ENDIF
  199. 103 CONTINUE
  200. RETURN
  201. ENDIF
  202. ENDIF
  203.  
  204. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  205. C PRODUIT
  206. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  207. 2 CONTINUE
  208. C DANS LE CAS *0. ON SORT DIRECT CAR VPOCHA A SEULEMENT ETE SEGINI
  209. IF (ABS(X1I) .LE. XPETIT) RETURN
  210. DO 201 IA=1,NSOUPO
  211. MSOUPO=MCHPOI.IPCHP(IA)
  212. MSOUP1=MCHPO1.IPCHP(IA)
  213. MPOVAL=MSOUPO.IPOVAL
  214. MPOVA1=MSOUP1.IPOVAL
  215. N =MPOVAL.VPOCHA(/1)
  216. NC=MPOVAL.VPOCHA(/2)
  217.  
  218. IRES = MOD(N,NBTHR)
  219. IF (IRES .EQ. 0) THEN
  220. ILON = N / NBTHR
  221. IDEB = (ithr -1)* ILON + 1
  222. ELSE
  223. IF (ithr .LE. IRES) THEN
  224. ILON = (N / NBTHR) + 1
  225. IDEB = (ithr -1)* ILON + 1
  226. ELSE
  227. ILON = N / NBTHR
  228. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  229. ENDIF
  230. ENDIF
  231. IFIN = IDEB + ILON - 1
  232. DO 201 IC=1,NC
  233. DO 201 IB = IDEB,IFIN
  234. MPOVAL.VPOCHA(IB,IC)=MPOVA1.VPOCHA(IB,IC) * X1I
  235. 201 CONTINUE
  236. RETURN
  237.  
  238. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  239. C ADDITION
  240. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  241. 3 CONTINUE
  242. DO 301 IA=1,NSOUPO
  243. MSOUPO=MCHPOI.IPCHP(IA)
  244. MSOUP1=MCHPO1.IPCHP(IA)
  245. MPOVAL=MSOUPO.IPOVAL
  246. MPOVA1=MSOUP1.IPOVAL
  247. N =MPOVAL.VPOCHA(/1)
  248. NC=MPOVAL.VPOCHA(/2)
  249.  
  250.  
  251. IRES = MOD(N,NBTHR)
  252. IF (IRES .EQ. 0) THEN
  253. ILON = N / NBTHR
  254. IDEB = (ithr -1)* ILON + 1
  255. ELSE
  256. IF (ithr .LE. IRES) THEN
  257. ILON = (N / NBTHR) + 1
  258. IDEB = (ithr -1)* ILON + 1
  259. ELSE
  260. ILON = N / NBTHR
  261. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  262. ENDIF
  263. ENDIF
  264. IFIN = IDEB + ILON - 1
  265. DO 301 IC=1,NC
  266. DO 301 IB = IDEB,IFIN
  267. MPOVAL.VPOCHA(IB,IC)=MPOVA1.VPOCHA(IB,IC) + X1I
  268. 301 CONTINUE
  269. RETURN
  270.  
  271. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  272. C SOUSTRACTION
  273. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  274. 4 CONTINUE
  275. DO 401 IA=1,NSOUPO
  276. MSOUPO=MCHPOI.IPCHP(IA)
  277. MSOUP1=MCHPO1.IPCHP(IA)
  278. MPOVAL=MSOUPO.IPOVAL
  279. MPOVA1=MSOUP1.IPOVAL
  280. N =MPOVAL.VPOCHA(/1)
  281. NC=MPOVAL.VPOCHA(/2)
  282.  
  283. IRES = MOD(N,NBTHR)
  284. IF (IRES .EQ. 0) THEN
  285. ILON = N / NBTHR
  286. IDEB = (ithr -1)* ILON + 1
  287. ELSE
  288. IF (ithr .LE. IRES) THEN
  289. ILON = (N / NBTHR) + 1
  290. IDEB = (ithr -1)* ILON + 1
  291. ELSE
  292. ILON = N / NBTHR
  293. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  294. ENDIF
  295. ENDIF
  296. IFIN = IDEB + ILON - 1
  297. IF (I1I .EQ. 1) THEN
  298. C Cas CHP1 - FLO1
  299. DO 402 IC=1,NC
  300. DO 402 IB = IDEB,IFIN
  301. MPOVAL.VPOCHA(IB,IC)=MPOVA1.VPOCHA(IB,IC) - X1I
  302. 402 CONTINUE
  303. ELSE
  304. C Cas FLO1 - CHP1
  305. DO 403 IC=1,NC
  306. DO 403 IB = IDEB,IFIN
  307. MPOVAL.VPOCHA(IB,IC)=X1I - MPOVA1.VPOCHA(IB,IC)
  308. 403 CONTINUE
  309. ENDIF
  310. 401 CONTINUE
  311. RETURN
  312.  
  313. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  314. C DIVISION
  315. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  316. 5 CONTINUE
  317. DO 501 IA=1,NSOUPO
  318. MSOUPO=MCHPOI.IPCHP(IA)
  319. MSOUP1=MCHPO1.IPCHP(IA)
  320. MPOVAL=MSOUPO.IPOVAL
  321. MPOVA1=MSOUP1.IPOVAL
  322. N =MPOVAL.VPOCHA(/1)
  323. NC=MPOVAL.VPOCHA(/2)
  324. IRES = MOD(N,NBTHR)
  325. IF (IRES .EQ. 0) THEN
  326. ILON = N / NBTHR
  327. IDEB = (ithr -1)* ILON + 1
  328. ELSE
  329. IF (ithr .LE. IRES) THEN
  330. ILON = (N / NBTHR) + 1
  331. IDEB = (ithr -1)* ILON + 1
  332. ELSE
  333. ILON = N / NBTHR
  334. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  335. ENDIF
  336. ENDIF
  337. IFIN = IDEB + ILON - 1
  338. DO 501 IC=1,NC
  339. DO 501 IB = IDEB,IFIN
  340. IF (ABS(X1I) .GT. XPETIT) THEN
  341. MPOVAL.VPOCHA(IB,IC)=MPOVA1.VPOCHA(IB,IC) / X1I
  342. ELSE
  343. SERROR.BERROR(ithr) = .TRUE.
  344. RETURN
  345. ENDIF
  346. 501 CONTINUE
  347. RETURN
  348.  
  349.  
  350. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  351. C COSINUS
  352. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  353. 6 CONTINUE
  354. XVNOC = XPI / REAL(180.D0)
  355. DO 601 IA=1,NSOUPO
  356. MSOUPO=MCHPOI.IPCHP(IA)
  357. MSOUP1=MCHPO1.IPCHP(IA)
  358. MPOVAL=MSOUPO.IPOVAL
  359. MPOVA1=MSOUP1.IPOVAL
  360. N =MPOVAL.VPOCHA(/1)
  361. NC=MPOVAL.VPOCHA(/2)
  362. IRES = MOD(N,NBTHR)
  363. IF (IRES .EQ. 0) THEN
  364. ILON = N / NBTHR
  365. IDEB = (ithr -1)* ILON + 1
  366. ELSE
  367. IF (ithr .LE. IRES) THEN
  368. ILON = (N / NBTHR) + 1
  369. IDEB = (ithr -1)* ILON + 1
  370. ELSE
  371. ILON = N / NBTHR
  372. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  373. ENDIF
  374. ENDIF
  375. IFIN = IDEB + ILON - 1
  376. DO 601 IC=1,NC
  377. DO 601 IB = IDEB,IFIN
  378. MPOVAL.VPOCHA(IB,IC)=COS(XVNOC * MPOVA1.VPOCHA(IB,IC))
  379. 601 CONTINUE
  380. RETURN
  381.  
  382.  
  383. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  384. C SINUS
  385. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  386. 7 CONTINUE
  387. XVNOC = XPI / REAL(180.D0)
  388. DO 701 IA=1,NSOUPO
  389. MSOUPO=MCHPOI.IPCHP(IA)
  390. MSOUP1=MCHPO1.IPCHP(IA)
  391. MPOVAL=MSOUPO.IPOVAL
  392. MPOVA1=MSOUP1.IPOVAL
  393. N =MPOVAL.VPOCHA(/1)
  394. NC=MPOVAL.VPOCHA(/2)
  395. IRES = MOD(N,NBTHR)
  396. IF (IRES .EQ. 0) THEN
  397. ILON = N / NBTHR
  398. IDEB = (ithr -1)* ILON + 1
  399. ELSE
  400. IF (ithr .LE. IRES) THEN
  401. ILON = (N / NBTHR) + 1
  402. IDEB = (ithr -1)* ILON + 1
  403. ELSE
  404. ILON = N / NBTHR
  405. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  406. ENDIF
  407. ENDIF
  408. IFIN = IDEB + ILON - 1
  409. DO 701 IC=1,NC
  410. DO 701 IB = IDEB,IFIN
  411. MPOVAL.VPOCHA(IB,IC)=SIN(XVNOC * MPOVA1.VPOCHA(IB,IC))
  412. 701 CONTINUE
  413. RETURN
  414.  
  415.  
  416. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  417. C TANGENTE
  418. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  419. 8 CONTINUE
  420. XVNOC = XPI / REAL(180.D0)
  421. DO 801 IA=1,NSOUPO
  422. MSOUPO=MCHPOI.IPCHP(IA)
  423. MSOUP1=MCHPO1.IPCHP(IA)
  424. MPOVAL=MSOUPO.IPOVAL
  425. MPOVA1=MSOUP1.IPOVAL
  426. N =MPOVAL.VPOCHA(/1)
  427. NC=MPOVAL.VPOCHA(/2)
  428. IRES = MOD(N,NBTHR)
  429. IF (IRES .EQ. 0) THEN
  430. ILON = N / NBTHR
  431. IDEB = (ithr -1)* ILON + 1
  432. ELSE
  433. IF (ithr .LE. IRES) THEN
  434. ILON = (N / NBTHR) + 1
  435. IDEB = (ithr -1)* ILON + 1
  436. ELSE
  437. ILON = N / NBTHR
  438. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  439. ENDIF
  440. ENDIF
  441. IFIN = IDEB + ILON - 1
  442. DO 801 IC=1,NC
  443. DO 801 IB = IDEB,IFIN
  444. MPOVAL.VPOCHA(IB,IC)=TAN(XVNOC * MPOVA1.VPOCHA(IB,IC))
  445. 801 CONTINUE
  446. RETURN
  447.  
  448.  
  449. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  450. C ARCCOS
  451. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  452. 9 CONTINUE
  453. XVNOC = REAL(180.D0) / XPI
  454. DO 901 IA=1,NSOUPO
  455. MSOUPO=MCHPOI.IPCHP(IA)
  456. MSOUP1=MCHPO1.IPCHP(IA)
  457. MPOVAL=MSOUPO.IPOVAL
  458. MPOVA1=MSOUP1.IPOVAL
  459. N =MPOVAL.VPOCHA(/1)
  460. NC=MPOVAL.VPOCHA(/2)
  461. IRES = MOD(N,NBTHR)
  462. IF (IRES .EQ. 0) THEN
  463. ILON = N / NBTHR
  464. IDEB = (ithr -1)* ILON + 1
  465. ELSE
  466. IF (ithr .LE. IRES) THEN
  467. ILON = (N / NBTHR) + 1
  468. IDEB = (ithr -1)* ILON + 1
  469. ELSE
  470. ILON = N / NBTHR
  471. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  472. ENDIF
  473. ENDIF
  474. IFIN = IDEB + ILON - 1
  475. DO 901 IC=1,NC
  476. DO 901 IB = IDEB,IFIN
  477. X2 = MPOVA1.VPOCHA(IB,IC)
  478. IF ((X2 .GE. -1.) .AND. (X2 .LE. 1.)) THEN
  479. MPOVAL.VPOCHA(IB,IC)=XVNOC * ACOS(X2)
  480. ELSE
  481. SERROR.BERROR(ithr) = .TRUE.
  482. RETURN
  483. ENDIF
  484. 901 CONTINUE
  485. RETURN
  486.  
  487.  
  488. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  489. C ARCSIN
  490. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  491. 10 CONTINUE
  492. XVNOC = REAL(180.D0) / XPI
  493. DO 1001 IA=1,NSOUPO
  494. MSOUPO=MCHPOI.IPCHP(IA)
  495. MSOUP1=MCHPO1.IPCHP(IA)
  496. MPOVAL=MSOUPO.IPOVAL
  497. MPOVA1=MSOUP1.IPOVAL
  498. N =MPOVAL.VPOCHA(/1)
  499. NC=MPOVAL.VPOCHA(/2)
  500. IRES = MOD(N,NBTHR)
  501. IF (IRES .EQ. 0) THEN
  502. ILON = N / NBTHR
  503. IDEB = (ithr -1)* ILON + 1
  504. ELSE
  505. IF (ithr .LE. IRES) THEN
  506. ILON = (N / NBTHR) + 1
  507. IDEB = (ithr -1)* ILON + 1
  508. ELSE
  509. ILON = N / NBTHR
  510. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  511. ENDIF
  512. ENDIF
  513. IFIN = IDEB + ILON - 1
  514. DO 1001 IC=1,NC
  515. DO 1001 IB = IDEB,IFIN
  516. X2 = MPOVA1.VPOCHA(IB,IC)
  517. IF ((X2 .GE. -1.) .AND. (X2 .LE. 1.)) THEN
  518. MPOVAL.VPOCHA(IB,IC)=XVNOC * ASIN(X2)
  519. ELSE
  520. SERROR.BERROR(ithr) = .TRUE.
  521. RETURN
  522. ENDIF
  523. 1001 CONTINUE
  524. RETURN
  525.  
  526.  
  527. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  528. C ARCTAN
  529. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  530. 11 CONTINUE
  531. XVNOC = REAL(180.D0) / XPI
  532. DO 1101 IA=1,NSOUPO
  533. MSOUPO=MCHPOI.IPCHP(IA)
  534. MSOUP1=MCHPO1.IPCHP(IA)
  535. MPOVAL=MSOUPO.IPOVAL
  536. MPOVA1=MSOUP1.IPOVAL
  537. N =MPOVAL.VPOCHA(/1)
  538. NC=MPOVAL.VPOCHA(/2)
  539. IRES = MOD(N,NBTHR)
  540. IF (IRES .EQ. 0) THEN
  541. ILON = N / NBTHR
  542. IDEB = (ithr -1)* ILON + 1
  543. ELSE
  544. IF (ithr .LE. IRES) THEN
  545. ILON = (N / NBTHR) + 1
  546. IDEB = (ithr -1)* ILON + 1
  547. ELSE
  548. ILON = N / NBTHR
  549. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  550. ENDIF
  551. ENDIF
  552. IFIN = IDEB + ILON - 1
  553. DO 1101 IC=1,NC
  554. DO 1101 IB = IDEB,IFIN
  555. MPOVAL.VPOCHA(IB,IC)=XVNOC * ATAN(MPOVA1.VPOCHA(IB,IC))
  556. 1101 CONTINUE
  557. RETURN
  558.  
  559.  
  560. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  561. C EXPONENTIELLE
  562. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  563. 12 CONTINUE
  564. DO 1201 IA=1,NSOUPO
  565. MSOUPO=MCHPOI.IPCHP(IA)
  566. MSOUP1=MCHPO1.IPCHP(IA)
  567. MPOVAL=MSOUPO.IPOVAL
  568. MPOVA1=MSOUP1.IPOVAL
  569. N =MPOVAL.VPOCHA(/1)
  570. NC=MPOVAL.VPOCHA(/2)
  571. IRES = MOD(N,NBTHR)
  572. IF (IRES .EQ. 0) THEN
  573. ILON = N / NBTHR
  574. IDEB = (ithr -1)* ILON + 1
  575. ELSE
  576. IF (ithr .LE. IRES) THEN
  577. ILON = (N / NBTHR) + 1
  578. IDEB = (ithr -1)* ILON + 1
  579. ELSE
  580. ILON = N / NBTHR
  581. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  582. ENDIF
  583. ENDIF
  584. IFIN = IDEB + ILON - 1
  585. DO 1201 IC=1,NC
  586. DO 1201 IB = IDEB,IFIN
  587. MPOVAL.VPOCHA(IB,IC)=EXP(MPOVA1.VPOCHA(IB,IC))
  588. 1201 CONTINUE
  589. RETURN
  590.  
  591.  
  592. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  593. C LOGARITHME
  594. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  595. 13 CONTINUE
  596. DO 1301 IA=1,NSOUPO
  597. MSOUPO=MCHPOI.IPCHP(IA)
  598. MSOUP1=MCHPO1.IPCHP(IA)
  599. MPOVAL=MSOUPO.IPOVAL
  600. MPOVA1=MSOUP1.IPOVAL
  601. N =MPOVAL.VPOCHA(/1)
  602. NC=MPOVAL.VPOCHA(/2)
  603. IRES = MOD(N,NBTHR)
  604. IF (IRES .EQ. 0) THEN
  605. ILON = N / NBTHR
  606. IDEB = (ithr -1)* ILON + 1
  607. ELSE
  608. IF (ithr .LE. IRES) THEN
  609. ILON = (N / NBTHR) + 1
  610. IDEB = (ithr -1)* ILON + 1
  611. ELSE
  612. ILON = N / NBTHR
  613. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  614. ENDIF
  615. ENDIF
  616. IFIN = IDEB + ILON - 1
  617. DO 1301 IC=1,NC
  618. DO 1301 IB = IDEB,IFIN
  619. X2 = MPOVA1.VPOCHA(IB,IC)
  620. IF (X2 .GE. XPETIT) THEN
  621. MPOVAL.VPOCHA(IB,IC)=LOG(X2)
  622. ELSE
  623. SERROR.BERROR(ithr) = .TRUE.
  624. RETURN
  625. ENDIF
  626. 1301 CONTINUE
  627. RETURN
  628.  
  629.  
  630. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  631. C VALEUR ABSOLUE
  632. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  633. 14 CONTINUE
  634. DO 1401 IA=1,NSOUPO
  635. MSOUPO=MCHPOI.IPCHP(IA)
  636. MSOUP1=MCHPO1.IPCHP(IA)
  637. MPOVAL=MSOUPO.IPOVAL
  638. MPOVA1=MSOUP1.IPOVAL
  639. N =MPOVAL.VPOCHA(/1)
  640. NC=MPOVAL.VPOCHA(/2)
  641. IRES = MOD(N,NBTHR)
  642. IF (IRES .EQ. 0) THEN
  643. ILON = N / NBTHR
  644. IDEB = (ithr -1)* ILON + 1
  645. ELSE
  646. IF (ithr .LE. IRES) THEN
  647. ILON = (N / NBTHR) + 1
  648. IDEB = (ithr -1)* ILON + 1
  649. ELSE
  650. ILON = N / NBTHR
  651. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  652. ENDIF
  653. ENDIF
  654. IFIN = IDEB + ILON - 1
  655. DO 1401 IC=1,NC
  656. DO 1401 IB = IDEB,IFIN
  657. MPOVAL.VPOCHA(IB,IC)=ABS(MPOVA1.VPOCHA(IB,IC))
  658. 1401 CONTINUE
  659. RETURN
  660.  
  661.  
  662. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  663. C COSINUS HYPERBOLIQUE
  664. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  665. 15 CONTINUE
  666. DO 1501 IA=1,NSOUPO
  667. MSOUPO=MCHPOI.IPCHP(IA)
  668. MSOUP1=MCHPO1.IPCHP(IA)
  669. MPOVAL=MSOUPO.IPOVAL
  670. MPOVA1=MSOUP1.IPOVAL
  671. N =MPOVAL.VPOCHA(/1)
  672. NC=MPOVAL.VPOCHA(/2)
  673. IRES = MOD(N,NBTHR)
  674. IF (IRES .EQ. 0) THEN
  675. ILON = N / NBTHR
  676. IDEB = (ithr -1)* ILON + 1
  677. ELSE
  678. IF (ithr .LE. IRES) THEN
  679. ILON = (N / NBTHR) + 1
  680. IDEB = (ithr -1)* ILON + 1
  681. ELSE
  682. ILON = N / NBTHR
  683. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  684. ENDIF
  685. ENDIF
  686. IFIN = IDEB + ILON - 1
  687. DO 1501 IC=1,NC
  688. DO 1501 IB = IDEB,IFIN
  689. MPOVAL.VPOCHA(IB,IC)=COSH(MPOVA1.VPOCHA(IB,IC))
  690. 1501 CONTINUE
  691. RETURN
  692.  
  693.  
  694. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  695. C SINUS HYPERBOLIQUE
  696. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  697. 16 CONTINUE
  698. DO 1601 IA=1,NSOUPO
  699. MSOUPO=MCHPOI.IPCHP(IA)
  700. MSOUP1=MCHPO1.IPCHP(IA)
  701. MPOVAL=MSOUPO.IPOVAL
  702. MPOVA1=MSOUP1.IPOVAL
  703. N =MPOVAL.VPOCHA(/1)
  704. NC=MPOVAL.VPOCHA(/2)
  705. IRES = MOD(N,NBTHR)
  706. IF (IRES .EQ. 0) THEN
  707. ILON = N / NBTHR
  708. IDEB = (ithr -1)* ILON + 1
  709. ELSE
  710. IF (ithr .LE. IRES) THEN
  711. ILON = (N / NBTHR) + 1
  712. IDEB = (ithr -1)* ILON + 1
  713. ELSE
  714. ILON = N / NBTHR
  715. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  716. ENDIF
  717. ENDIF
  718. IFIN = IDEB + ILON - 1
  719. DO 1601 IC=1,NC
  720. DO 1601 IB = IDEB,IFIN
  721. MPOVAL.VPOCHA(IB,IC)=SINH(MPOVA1.VPOCHA(IB,IC))
  722. 1601 CONTINUE
  723. RETURN
  724.  
  725.  
  726. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  727. C TANGENTE HYPERBOLIQUE
  728. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  729. 17 CONTINUE
  730. DO 1701 IA=1,NSOUPO
  731. MSOUPO=MCHPOI.IPCHP(IA)
  732. MSOUP1=MCHPO1.IPCHP(IA)
  733. MPOVAL=MSOUPO.IPOVAL
  734. MPOVA1=MSOUP1.IPOVAL
  735. N =MPOVAL.VPOCHA(/1)
  736. NC=MPOVAL.VPOCHA(/2)
  737. IRES = MOD(N,NBTHR)
  738. IF (IRES .EQ. 0) THEN
  739. ILON = N / NBTHR
  740. IDEB = (ithr -1)* ILON + 1
  741. ELSE
  742. IF (ithr .LE. IRES) THEN
  743. ILON = (N / NBTHR) + 1
  744. IDEB = (ithr -1)* ILON + 1
  745. ELSE
  746. ILON = N / NBTHR
  747. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  748. ENDIF
  749. ENDIF
  750. IFIN = IDEB + ILON - 1
  751. DO 1701 IC=1,NC
  752. DO 1701 IB = IDEB,IFIN
  753. MPOVAL.VPOCHA(IB,IC)=TANH(MPOVA1.VPOCHA(IB,IC))
  754. 1701 CONTINUE
  755. RETURN
  756.  
  757.  
  758. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  759. C ERF (Fonction Erreur)
  760. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  761. 18 CONTINUE
  762. DO 1801 IA=1,NSOUPO
  763. MSOUPO=MCHPOI.IPCHP(IA)
  764. MSOUP1=MCHPO1.IPCHP(IA)
  765. MPOVAL=MSOUPO.IPOVAL
  766. MPOVA1=MSOUP1.IPOVAL
  767. N =MPOVAL.VPOCHA(/1)
  768. NC=MPOVAL.VPOCHA(/2)
  769. IRES = MOD(N,NBTHR)
  770. IF (IRES .EQ. 0) THEN
  771. ILON = N / NBTHR
  772. IDEB = (ithr -1)* ILON + 1
  773. ELSE
  774. IF (ithr .LE. IRES) THEN
  775. ILON = (N / NBTHR) + 1
  776. IDEB = (ithr -1)* ILON + 1
  777. ELSE
  778. ILON = N / NBTHR
  779. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  780. ENDIF
  781. ENDIF
  782. IFIN = IDEB + ILON - 1
  783. DO 1801 IC=1,NC
  784. DO 1801 IB = IDEB,IFIN
  785. MPOVAL.VPOCHA(IB,IC)=ERF(MPOVA1.VPOCHA(IB,IC))
  786. 1801 CONTINUE
  787. RETURN
  788.  
  789.  
  790. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  791. C ERFC (Fonction Erreur Complementaire 1-ERF(x))
  792. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  793. 19 CONTINUE
  794. DO 1901 IA=1,NSOUPO
  795. MSOUPO=MCHPOI.IPCHP(IA)
  796. MSOUP1=MCHPO1.IPCHP(IA)
  797. MPOVAL=MSOUPO.IPOVAL
  798. MPOVA1=MSOUP1.IPOVAL
  799. N =MPOVAL.VPOCHA(/1)
  800. NC=MPOVAL.VPOCHA(/2)
  801. IRES = MOD(N,NBTHR)
  802. IF (IRES .EQ. 0) THEN
  803. ILON = N / NBTHR
  804. IDEB = (ithr -1)* ILON + 1
  805. ELSE
  806. IF (ithr .LE. IRES) THEN
  807. ILON = (N / NBTHR) + 1
  808. IDEB = (ithr -1)* ILON + 1
  809. ELSE
  810. ILON = N / NBTHR
  811. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  812. ENDIF
  813. ENDIF
  814. IFIN = IDEB + ILON - 1
  815. DO 1901 IC=1,NC
  816. DO 1901 IB = IDEB,IFIN
  817. MPOVAL.VPOCHA(IB,IC)=ERFC(MPOVA1.VPOCHA(IB,IC))
  818. 1901 CONTINUE
  819. RETURN
  820.  
  821.  
  822. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  823. C ARCOSH
  824. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  825. 20 CONTINUE
  826. DO 2001 IA=1,NSOUPO
  827. MSOUPO=MCHPOI.IPCHP(IA)
  828. MSOUP1=MCHPO1.IPCHP(IA)
  829. MPOVAL=MSOUPO.IPOVAL
  830. MPOVA1=MSOUP1.IPOVAL
  831. N =MPOVAL.VPOCHA(/1)
  832. NC=MPOVAL.VPOCHA(/2)
  833. IRES = MOD(N,NBTHR)
  834. IF (IRES .EQ. 0) THEN
  835. ILON = N / NBTHR
  836. IDEB = (ithr -1)* ILON + 1
  837. ELSE
  838. IF (ithr .LE. IRES) THEN
  839. ILON = (N / NBTHR) + 1
  840. IDEB = (ithr -1)* ILON + 1
  841. ELSE
  842. ILON = N / NBTHR
  843. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  844. ENDIF
  845. ENDIF
  846. IFIN = IDEB + ILON - 1
  847. DO 2001 IC=1,NC
  848. DO 2001 IB = IDEB,IFIN
  849. X2 = MPOVA1.VPOCHA(IB,IC)
  850. IF (X2 .GE. 1.) THEN
  851. MPOVAL.VPOCHA(IB,IC)=LOG(X2 + SQRT((X2**2) - 1.))
  852. ELSE
  853. SERROR.BERROR(ithr) = .TRUE.
  854. RETURN
  855. ENDIF
  856. 2001 CONTINUE
  857. RETURN
  858.  
  859.  
  860. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  861. C ARSINH
  862. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  863. 21 CONTINUE
  864. DO 2101 IA=1,NSOUPO
  865. MSOUPO=MCHPOI.IPCHP(IA)
  866. MSOUP1=MCHPO1.IPCHP(IA)
  867. MPOVAL=MSOUPO.IPOVAL
  868. MPOVA1=MSOUP1.IPOVAL
  869. N =MPOVAL.VPOCHA(/1)
  870. NC=MPOVAL.VPOCHA(/2)
  871. IRES = MOD(N,NBTHR)
  872. IF (IRES .EQ. 0) THEN
  873. ILON = N / NBTHR
  874. IDEB = (ithr -1)* ILON + 1
  875. ELSE
  876. IF (ithr .LE. IRES) THEN
  877. ILON = (N / NBTHR) + 1
  878. IDEB = (ithr -1)* ILON + 1
  879. ELSE
  880. ILON = N / NBTHR
  881. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  882. ENDIF
  883. ENDIF
  884. IFIN = IDEB + ILON - 1
  885. DO 2101 IC=1,NC
  886. DO 2101 IB = IDEB,IFIN
  887. X2 = MPOVA1.VPOCHA(IB,IC)
  888. MPOVAL.VPOCHA(IB,IC)=LOG(X2 + SQRT((X2**2) + 1.))
  889. 2101 CONTINUE
  890. RETURN
  891.  
  892.  
  893. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  894. C ARTANH
  895. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
  896. 22 CONTINUE
  897. DO 2201 IA=1,NSOUPO
  898. MSOUPO=MCHPOI.IPCHP(IA)
  899. MSOUP1=MCHPO1.IPCHP(IA)
  900. MPOVAL=MSOUPO.IPOVAL
  901. MPOVA1=MSOUP1.IPOVAL
  902. N =MPOVAL.VPOCHA(/1)
  903. NC=MPOVAL.VPOCHA(/2)
  904. IRES = MOD(N,NBTHR)
  905. IF (IRES .EQ. 0) THEN
  906. ILON = N / NBTHR
  907. IDEB = (ithr -1)* ILON + 1
  908. ELSE
  909. IF (ithr .LE. IRES) THEN
  910. ILON = (N / NBTHR) + 1
  911. IDEB = (ithr -1)* ILON + 1
  912. ELSE
  913. ILON = N / NBTHR
  914. IDEB = (IRES * (ILON+1)) + (ithr-IRES-1)* ILON + 1
  915. ENDIF
  916. ENDIF
  917. IFIN = IDEB + ILON - 1
  918. DO 2201 IC=1,NC
  919. DO 2201 IB = IDEB,IFIN
  920. X2 = MPOVA1.VPOCHA(IB,IC)
  921. IF ((X2 .GT. -1.) .AND. (X2 .LT. 1.)) THEN
  922. MPOVAL.VPOCHA(IB,IC)=0.5*LOG((1. + X2) / (1. - X2))
  923. ELSE
  924. SERROR.BERROR(ithr) = .TRUE.
  925. RETURN
  926. ENDIF
  927. 2201 CONTINUE
  928. RETURN
  929.  
  930.  
  931. END
  932.  
  933.  
  934.  
  935.  

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