# join top and bottom pieces and write final files # Can not use prism top, it was formed with stack and # the axis switched to make turn y to Z upward # the points can be used for connect read avs hex_lvl3.inp mo define CMO mo # infile subset.mlgi read avs tri_top_extrude.inp mo2 cmo printatt mo -xyz- minmax cmo printatt mo2 -xyz- minmax # Create volume mesh that can be used to find # delaunay tets that are created outside mesh boundaries addmesh merge/ mo_merge / mo mo2 cmo setatt mo_merge ipolydat no dump gmv mesh_merge.gmv mo_merge dump avs mesh_merge.inp mo_merge # Copy all points to new mo and connect delaunay # NOTE we are reading points from top, not elements cmo create mo_tet///tet read avs tri_top_prism_pts.inp mo_tet define CMO mo_tet # infile subset.mlgi copypts mo_tet mo /0,0/ dump gmv tmp_points_all.gmv mo_tet cmo select mo_tet cmo printatt mo_tet -xyz- minmax cmo/setatt/mo_tet/itetclr 1 cmo/setatt/mo_tet/imt 1 # remove duplicate points filter 1,0,0 rmpoint compress dump gmv points_for_tet.gmv mo_tet dump avs2 points_for_tet.inp mo_tet connect noadd rmpoint compress quality resetpts itp dump gmv tet_connect.gmv mo_tet dump avs tet_connect.inp mo_tet # find tets formed outside boundaries define IFLAG 10 interpolate/map/mo_tet itetclr 1,0,0/mo_merge itetclr/IFLAG dump gmv tet_connect.gmv mo_tet dump avs tet_connect.inp mo_tet cmo select mo_tet eltset edel itetclr eq IFLAG rmpoint element eltset,get,edel rmpoint compress resetpts itp cmo setatt mo_tet ipolydat no dump gmv tet_final.gmv mo_tet dump avs tet_final.inp mo_tet # CHECK ccoef cmo setatt mo_tet itetclr 1 cmo setatt mo_tet imt 1 resetpts itp dump stor tmp mo_tet dump gmv tet_ccoef.gmv mo_tet finish