Télécharger topochan.procedur

Retour à la liste

Numérotation des lignes :

  1. * TOPOCHAN PROCEDUR FD218221 25/12/18 21:15:03 12429
  2.  
  3. ************************************************************************
  4. ** Procedure called by TOPOPTIM to switch the associated model of an
  5. ** element field expressed at the centroid of the elements.
  6. **
  7. ** Author:
  8. ** Guenhael Le Quilliec (LaMe - Polytech Tours)
  9. **
  10. ** Version:
  11. ** 1.2 2025/11/21 Use EXTR instead of PROI to save computation time
  12. ** 1.1 2021/04/20 Fixed a minor issue by adding 'SCALAIRE' type
  13. ** 1.0 2017/04/18 Initial version
  14. ************************************************************************
  15.  
  16. DEBP TOPOCHAN inpfld*'MCHAML' mod*'MMODEL' ctrmsh*'MAILLAGE' ;
  17.  
  18. * List of components of inpfld
  19. lstcpn = EXTR inpfld 'COMP' ;
  20.  
  21. * If there is only one component
  22. SI ((DIME lstcpn) EGA 1) ;
  23.  
  24. * Extract the name of the component and the type of the input field
  25. cpn = EXTR lstcpn 1 ;
  26. typ = EXTR (EXTR inpfld 'TYPE') 1 ;
  27. * Extract all values in the order of ctrmsh
  28. val = EXTR inpfld 'VALE' cpn ;
  29. * Get the element field associated with the given model
  30. outfld = MANU 'CHML' mod 'REPA' cpn val 'TYPE' typ 'GRAVITE' ;
  31. * In thermal mode, the 'GRAVITE' option is not respected
  32. * This issue is resolved by using CHAN 'GRAVITE' outfld mod
  33.  
  34. * If there is more than one component
  35. SINO ;
  36.  
  37. * Loop over each component
  38. REPE itr (DIME lstcpn) ;
  39. cpn = EXTR lstcpn &itr ;
  40. tmp = TOPOCHAN (EXCO inpfld cpn) mod ctrmsh ;
  41. SI (&itr EGA 1) ;
  42. outfld = tmp ;
  43. SINO ;
  44. outfld = outfld ET tmp ;
  45. FINS ;
  46. FIN itr ;
  47.  
  48. FINS ;
  49.  
  50. FINP outfld ;
  51.  
  52.  
  53.  

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