Télécharger cinema.procedur

Retour à la liste

Numérotation des lignes :

  1. * CINEMA PROCEDUR PYROS1 96/01/03 21:16:00 1968
  2. 'DEBPROC' CINEMA MESH0*'MAILLAGE' MESH1*'MAILLAGE' MESH2*'MAILLAGE'
  3. VECT1*'POINT';
  4. *********************************************************************
  5. * INPUT:
  6. * MESH0=MESH TO BE PLOTTED
  7. * MESH1=MESH OF POI1 INDICATING THE SUCESSIVE POSITION OF THE POINT
  8. * OF VIEW OF THE OBSERVER
  9. * MESH2=MESH OF POI1 INDICATING THE SUCCESSIVE DIRECTION POINTED BY
  10. * THE EYES OF THE OBSERVER
  11. * VECT1=DIRECTION DEFINING THE (FIXED) VERTICAL AXE OF THE HEAD OF THE
  12. * OBSERVER
  13. * OUTPUT:
  14. * DEFOT=SUCCESSIVE DEFORME OF THE MESH REFERENCED TO THE FIRST POSITION
  15. * OF THE OBSERVER
  16. *********************************************************************
  17. * P.PEGON/JRC ISPRA/05.95
  18. *********************************************************************
  19. *
  20. VECT1=VECT1/('NORM' VECT1);
  21. *
  22. LOK=VRAI;
  23. *
  24. * verification des donnees
  25. *
  26. LMOT1=MESH1 'ELEM' 'TYPE' ;
  27. 'SI' ('NEG' ('DIME' LMOT1) 1);
  28. LOK=FAUX;
  29. 'MESS' 'CINEMA: MESH1 contient plusieurs types d"element';
  30. 'SINON';
  31. 'SI' ('NEG' ('EXTR' LMOT1 1) 'POI1');
  32. LOK=FAUX;
  33. 'MESS' 'CINEMA: MESH1 n"est pas un maillage de POI1';
  34. 'FINSI';
  35. 'FINSI';
  36. *
  37. LMOT2=MESH2 'ELEM' 'TYPE' ;
  38. 'SI' ('NEG' ('DIME' LMOT2) 1);
  39. LOK=FAUX;
  40. 'MESS' 'CINEMA: MESH2 contient plusieurs types d"element';
  41. 'SINON';
  42. 'SI' ('NEG' ('EXTR' LMOT2 1) 'POI1');
  43. LOK=FAUX;
  44. 'MESS' 'CINEMA: MESH2 n"est pas un maillage de POI1';
  45. 'FINSI';
  46. 'FINSI';
  47. *
  48. NBEL1='NBEL' MESH1;
  49. NBEL2='NBEL' MESH2;
  50. 'SI' ('NEG' NBEL1 NBEL2);
  51. LOK=FAUX;
  52. 'MESS' 'CINEMA: MESH1 et MESH2 n"ont pas le meme nb d"elements';
  53. 'FINSI';
  54. 'SI' ('EGA' NBEL1 1);
  55. LOK=FAUX;
  56. 'MESS' 'CINEMA: MESH1 ne contient que un element';
  57. 'FINSI';
  58. *
  59. 'SI' LOK;
  60. 'MESS' 'CINEMA: traitement deformee numero' 1 'sur' NBEL1;
  61. *
  62. * traitement du premier point
  63. *
  64. OEIL1='POINT' ('ELEM' MESH1 1) 1;
  65. DIRE1='POINT' ('ELEM' MESH2 1) 1;
  66. DIRE1=DIRE1 'MOIN' ( (DIRE1 'PSCAL' VECT1) * VECT1 );
  67. DIRE1=DIRE1/('NORM' DIRE1);
  68. UUUU1='MANU' 'CHPO' MESH0 3 'UX' 0 'UY' 0 'UZ' 0;
  69. DEFO1='DEFO' MESH0 UUUU1 1;
  70. DEFOT=DEFO1;
  71. XX1 YY1 ZZ1='COOR' MESH0;
  72. *
  73. * traitement des autres points
  74. *
  75. J=1; 'REPE' LAB1 (NBEL1-1); J=J+1;
  76. 'MESS' 'CINEMA: traitement deformee numero' J 'sur' NBEL1;
  77. *
  78. OEILJ='POINT' ('ELEM' MESH1 J) 1;
  79. DIREJ='POINT' ('ELEM' MESH2 J) 1;
  80. DIREJ=DIREJ 'MOIN' ( (DIREJ 'PSCAL' VECT1) * VECT1 );
  81. DIREJ=DIREJ/('NORM' DIREJ);
  82. *
  83. TRAJ1=OEIL1 'MOINS' OEILJ;
  84. XTRAJ1 YTRAJ1 ZTRAJ1='COOR' TRAJ1;
  85. UUUJ1='MANU' 'CHPO' MESH0 3 'UX' XTRAJ1 'UY' YTRAJ1 'UZ' ZTRAJ1;
  86. *
  87. OMEJ1=DIREJ 'PVEC' DIRE1;
  88. SINJ1='NORM' OMEJ1;
  89. *
  90. COSJ1=DIREJ 'PSCA' DIRE1;
  91. 'SI' (SINJ1 '>' 1.E-4);
  92. 'SI' (('ABS' COSJ1) '>' 1.E-4);
  93. ANGJ1='ATG' SINJ1 COSJ1;
  94. 'SINON';
  95. ANGJ1=90.;
  96. 'FINSI';
  97. 'SINON';
  98. OMEJ1=VECT1;
  99. 'SI' (COSJ1 '>' 0.);
  100. ANGJ1=0.;
  101. 'SINON';
  102. ANGJ1=180.;
  103. 'FINSI';
  104. 'FINSI';
  105. 'SI' ('NEG' ANGJ1 0.);
  106. 'DEPL' MESH0 'TOUR' ANGJ1 OEILJ (OEILJ 'PLUS' OMEJ1);
  107. XXJ YYJ ZZJ='COOR' MESH0;
  108. 'DEPL' MESH0 'TOUR' ((-1)*ANGJ1) OEILJ (OEILJ 'PLUS' OMEJ1);
  109. UUUJ1=UUUJ1 + ('EXCO' (XXJ-XX1) 'SCAL' 'UX')
  110. + ('EXCO' (YYJ-YY1) 'SCAL' 'UY')
  111. + ('EXCO' (ZZJ-ZZ1) 'SCAL' 'UZ');
  112. 'FINSI';
  113. DEFJ1='DEFO' MESH0 UUUJ1 1;
  114. DEFOT=DEFOT 'ET' DEFJ1;
  115. *
  116. 'FIN' LAB1;
  117. *
  118. 'SINON';
  119. DEFOT=LOK;
  120. 'FINSI';
  121. *
  122. 'FINPROC' DEFOT;
  123.  
  124.  

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