Télécharger rendsour.procedur

Retour à la liste

Numérotation des lignes :

  1. * RENDSOUR PROCEDUR SP204843 25/06/12 21:15:03 12281
  2. debp RENDSOUR CGMOD1*CHARGEMENT CGMAT1*CHARGEMENT LREE1/LISTREEL MOT1/MOT ;
  3.  
  4. *-------------------------- ANALYSE ENTREES ---------------------------*
  5.  
  6. * Lecture des arguments optionnels :
  7. si (non (exis LREE1)) ;
  8. LREE1 = extr CGMOD1 'LREE' ;
  9. fins ;
  10.  
  11. imoye1 = faux ;
  12. inorm1 = vrai ;
  13. si (exis MOT1) ;
  14. si (ega MOT1 'MOYE') ;
  15. imoye1 = vrai ;
  16. fins ;
  17. si (ega MOT1 'NONORM') ;
  18. inorm1 = faux ;
  19. fins ;
  20. si (inorm1 et (non imoye1)) ;
  21. mess '***** ERREUR : on attend le mot-clé ''MOYE'' ou ''NONORM'' ' ;
  22. quit RENDSOUR ;
  23. fins ;
  24. fins ;
  25.  
  26. *----------------------------- TRAITEMENT -----------------------------*
  27.  
  28. * Listobje :
  29. LMOD1 = extr CGMOD1 'LOBJ' ;
  30. LMAT1 = extr CGMAT1 'LOBJ' ;
  31.  
  32. * Tolerance sur intensite source :
  33. MAT1 = extr LMAT1 1 ;
  34. qmax1 = ((mat1 extr qtot 1 1 1) extr ordo) maxi abs ;
  35. tolq1 = 1.e-6 * qmax1 ;
  36.  
  37. * Initialisation des sorties :
  38. ltps1 = prog ;
  39. resu1 = prog ;
  40. lmoy1 = prog ;
  41.  
  42. * Boucles sur instants fournis :
  43. nb1 = dime lree1 ;
  44. repe bmes1 nb1 ;
  45. floti1 = extr lree1 &bmes1 ;
  46. modi1 = tire CGMOD1 mode floti1 ;
  47. chvari1 = manu chml modi1 temp floti1 ;
  48. mati1 = tire CGMAT1 mate floti1 ;
  49. mati1 = vari nuag modi1 mati1 chvari1 ;
  50. qtoti1 = (exco mati1 qtot) maxi ;
  51. si imoye1 ;
  52. si ((abs qtoti1) < tolq1) ;
  53. resui1 = qtoti1 ;
  54. sino ;
  55. chqi1 = sour modi1 mati1 ;
  56. resui1 = (resu chqi1) maxi ;
  57. resui1 = resui1 / qtoti1 ;
  58. fins ;
  59. si (&bmes1 > 1) ;
  60. moyei1 = 0.5 * (resui0 + resui1) ;
  61. si (moyei1 >EG tolq1) ;
  62. lmoy1 = lmoy1 et moyei1 ;
  63. fins ;
  64. fins ;
  65. qtoti0 = qtoti1 ;
  66. resui0 = resui1 ;
  67. sino ;
  68. si ((abs qtoti1) < tolq1) ; iter bmes1 ; fins ;
  69. chqi1 = sour modi1 mati1 ;
  70. resui1 = (resu chqi1) maxi ;
  71. si inorm1 ; resui1 = resui1 / qtoti1 ; fins ;
  72. resu1 = resu1 et resui1 ;
  73. ltps1 = ltps1 et floti1 ;
  74. fins ;
  75. fin bmes1 ;
  76.  
  77. * Mise en forme resultat :
  78. si imoye1 ;
  79. resu1 = (somm lmoy1) / ((dime lmoy1) flot) ;
  80. sino ;
  81. si (nb1 ega 1) ;
  82. resu1 = resu1 extr 1 ;
  83. sino ;
  84. resu1 = evol manu 'TEMP' ltps1 resu1 ;
  85. fins ;
  86. fins ;
  87.  
  88. *------------------------------- SORTIE -------------------------------*
  89.  
  90. finp RESU1 ;
  91.  
  92.  
  93.  

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