# CREATE hex mesh define MO_MESH mo_hex define/R0/ 0.0 define/Z0/ 0.0 define/R1/ 10.0 define/Z1/ 8.0 define/ND/ 11 define/NZ/ 9 cmo / create / MO_MESH / / / hex createpts/brick/xyz/ND ND NZ/R0 R0 Z0/R1 R1 Z1/1 1 1 # COLOR elements material 1 and material 2 pset/p2/attribute xic/1,0,0/ gt 6. eltset/e2/ inclusive pset,get,p2 cmo / setatt / MO_MESH / itetclr 1 cmo / setatt / MO_MESH / itetclr eltset,get,e2 2 # SET BOUNDARIES AND INTERFACES resetpts/itp dump/avs/box.inp/ MO_MESH dump/gmv/box.gmv/ MO_MESH # EXTRACT ALL EXTERNAL AND INTERFACE BOUNDARIES # Set material itetclr to attribute itetclr1 extract/surfmesh/1,0,0/ mos_all / MO_MESH cmo/copyatt/ mos_all mos_all / itetclr itetclr1 # EXTRACT EXTERNAL ONLY # Set material itetclr to attribute itetclr1 extract/surfmesh/1,0,0/ mos_ext / MO_MESH / external cmo/copyatt/ mos_ext mos_ext / itetclr itetclr1 # CONVERT QUADS to TRI # Set material itetclr to normals in 6 directions grid2grid/quadtotri2/ mos_tri / mos_ext cmo/select/mos_tri settets/normal # write files dump/avs/ surfmesh_all.inp / mos_all dump/ surfmesh_all.gmv / mos_all dump/avs/ surfmesh_external.inp / mos_ext dump/ surfmesh_external.gmv / mos_ext dump/avs/ surfmesh_ext_tri.inp / mos_tri dump/ surfmesh_ext_tri.gmv / mos_tri # report status of all mesh objects cmo/status # report attribute min max for mos_all cmo/printatt/mos_all/ -all- minmax finish