Télécharger topofilt.procedur

Retour à la liste

Numérotation des lignes :

  1. * TOPOFILT PROCEDUR FD218221 23/11/29 21:15:09 11799
  2.  
  3. ************************************************************************
  4. ** Procedure called by TOPOPTIM for filtering the sensitivity field.
  5. **
  6. ** Author:
  7. ** Guenhael Le Quilliec (LaMe - Polytech Tours)
  8. **
  9. ** Version:
  10. ** 3.0 2021/04/19 Adding a second filtering function using a filtering
  11. ** matrix generated with the operator MFIL
  12. ** 2.0 2017/11/11 Default Gibiane filter
  13. ************************************************************************
  14.  
  15. DEBP TOPOFILT tab0*'TABLE' ;
  16.  
  17. * Input data
  18. * **********
  19.  
  20. wtab0 = tab0.'WTABLE' ;
  21. bool0 = wtab0.'BOOL' ;
  22.  
  23. * Matrix filtering
  24. * ****************
  25.  
  26. SI (EGA tab0.'FILTRE' 'MATRICE') ;
  27.  
  28. * Build the filtering matrix
  29. * **************************
  30.  
  31. * If the mesh has changed
  32. SI (NEG (VALE 'POIN' wtab0.'MAILLAGE'.'GRAVITE') wtab0.'MFIL_POINTEUR') ;
  33. SI bool0.'MECANIQUE' ;
  34. volEl1 = wtab0.'MECANIQUE'.'VOLUME'.(1) ;
  35. SINO ;
  36. volEl1 = wtab0.'THERMIQUE'.'VOLUME'.(1) ;
  37. FINS ;
  38. wtab0.'MFIL_POINTEUR' = VALE 'POIN' wtab0.'MAILLAGE'.'GRAVITE' ;
  39. MESS 'Mise à jour de la matrice de filtrage en cours...' ;
  40. wtab0.'MFIL' = MFIL (PROI wtab0.'MAILLAGE'.'GRAVITE' volEl1)
  41. tab0.'FILTRE_RAYON' tab0.'FILTRE_EXPOSANT'
  42. tab0.'FILTRE_CRITERE' ;
  43. MESS 'Fin de mise à jour de la matrice de filtrage.' ;
  44. FINS ;
  45.  
  46. * Filter the sensibility field
  47. * ****************************
  48.  
  49. * Node field to be filtered
  50. field0 = PROI wtab0.'MAILLAGE'.'GRAVITE' (wtab0.'SENSIBILITE' * wtab0.'TOPOLOGIE') ;
  51. * Filter the node field and sort all its values in the same order of the elements (as the product with the rigidity filtering affects the order of the output values)
  52. field0 = wtab0.'CHPO_ZERO'.(1) + (field0 * wtab0.'MFIL') ;
  53. * Filtered element field
  54. field0 = MANU 'CHML' wtab0.'MODELE'.(1) 'REPA' 'SCAL' (EXTR field0 'VALE') 'TYPE' 'SCALAIRE' 'GRAVITE' ;
  55. * In thermal mode, 'GRAVITE' option is not respected
  56. * This problem is solved by INTG 'ELEM'
  57. SI (NON bool0.'MECANIQUE') ;
  58. field0 = (INTG 'ELEM' field0 wtab0.'THERMIQUE'.'MODELE'.(1) wtab0.'THERMIQUE'.'CARACTERISTIQUES'.(1)) / wtab0.'THERMIQUE'.'VOLUME'.(1) ;
  59. FINS ;
  60. * Filtered sensitivity
  61. wtab0.'SENSIBILITE' = field0 / (BORN wtab0.'TOPOLOGIE' 'SCAL' 'MINI' tab0.'ZERO_DIVISION') ;
  62.  
  63. * Default Gibiane filtering
  64. * *************************
  65.  
  66. SINO ;
  67. SI (tab0.'FILTRE_TAUX' > 0) ;
  68. * Field to be filtered
  69. field0 = wtab0.'SENSIBILITE' * wtab0.'TOPOLOGIE' ;
  70. * Filtering
  71. REPE loop0 tab0.'FILTRE_TAUX' ;
  72. field0 = CHAN 'CHAM' (CHAN 'CHPO' wtab0.'MODELE'.(1) field0 'MOYE') wtab0.'MODELE'.(1) 'GRAVITE' ;
  73. FIN loop0 ;
  74. * In thermal mode, 'GRAVITE' option is not respected
  75. * This problem is solved by INTG 'ELEM'
  76. SI (NON bool0.'MECANIQUE') ;
  77. field0 = (INTG 'ELEM' field0 wtab0.'MODELE'.(1) wtab0.'THERMIQUE'.'CARACTERISTIQUES'.(1)) / wtab0.'THERMIQUE'.'VOLUME'.(1) ;
  78. FINS ;
  79. dc0 = field0 / (BORN wtab0.'TOPOLOGIE' 'SCAL' 'MINI' tab0.'ZERO_DIVISION') ;
  80. * Save the filtered sensibility
  81. wtab0.'SENSIBILITE' = dc0 ;
  82. FINS ;
  83. FINS ;
  84.  
  85. FINP ;
  86.  
  87.  
  88.  

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