*--* ex_hextotet_5_6 *--* Header Begin *--* LAGriT Example Input file * Carl Gable * gable -at- lanl -dot- gov * * *--* Create a single hex, *--* Convert the hex to 6 tets, *--* Convert the hex to 5 tets, *--* Convert the hex to 24 tets, *--* Use the TRANS command to translate each mesh to a new location *--* Use the LOOP command to set the element id (itetclr), *--* Put the three MO into a single MO *--* *--*---------------------------------------------------- *--* Header End *--* ex_hextotet_5_6 *--* * * Build one hex cmo / create / cmo_hex / / / hex * cmo / select / cmo_hex createpts/brick/xyz/2,2,2/0.,0.,0./1.,1.,1./1,1,1 * * Set the itetclr, imt and itp values * cmo / setatt / cmo_hex / itetclr / 1 0 0 / 1 cmo / setatt / cmo_hex / imt / 1 0 0 / 1 resetpts / itp * * Convert the hex MO into 5, 6 and 24 tets * hextotet / 5 / cmo_tet5 / cmo_hex quality hextotet / 6 / cmo_tet6 / cmo_hex quality hextotet / 24 / cmo_tet24 / cmo_hex quality * * Move the mesh objects so that when they are all put together * they will not be on top of one another. * cmo / select / cmo_tet6 trans / 1 0 0 / 0. 0. 0. / 1.2 0. 0. cmo / select / cmo_tet24 trans / 1 0 0 / 0. 0. 0. / 2.4 0. 0. * * Set the itetclr so they are all different. * cmo / select / cmo_tet5 loop / do / I / 1 5 1 / loop_end / cmo / setatt / cmo_tet5 / itetclr / I I 1 / I cmo / select / cmo_tet6 loop / do / I / 1 6 1 / loop_end / cmo / setatt / cmo_tet6 / itetclr / I I 1 / I cmo / select / cmo_tet24 loop / do / I / 1 24 1 /loop_end / cmo / setatt / cmo_tet24/ itetclr / I I 1 / I * * Print out the min/max values of itetclr. This is for information only * and does not change anything in the MO. * cmo / printatt / cmo_tet5 / itetclr / minmax cmo / printatt / cmo_tet6 / itetclr / minmax cmo / printatt / cmo_tet24/ itetclr / minmax * * Use the addmesh command to put all the mesh objects into a single mesh object. * Note that the append command will change the imt and itetlcr values. * Use addmesh/merge to if you want the values unchanged. * addmesh / append / cmo_all / cmo_tet5 / cmo_tet6 addmesh / append / cmo_all / cmo_all / cmo_tet24 * * Output the mesh * cmo / select / cmo_all quality cmo/setatt//ipolydat/no dump / gmv / hextotet.gmv / cmo_all finish