# Interpolate ice wedge mesh on to full stacked mesh # This will overwrite material layers with ice 30 # Input the ice wedge mesh object read / gmv / ice_wedge.gmv / mo_ice cmo/printatt mo_ice -xyz- minmax cmo/printatt mo_ice itetclr minmax cmo / setatt / mo_ice / itetclr / 30 cmo / copyatt / mo_ice / mo_ice / mat_orig / itetclr # Input the full stacked mesh read / gmv / full_mesh.gmv / mo cmo/printatt mo -xyz- minmax cmo / addatt / mo / ielemclr / VINT / scalar / nnodes cmo / addatt / mo / mat_orig / VINT / scalar / nelements cmo / copyatt / mo / mo / mat_orig / itetclr # Interpolate ice wedge mesh on to full mesh node attribute ielemclr # Save itetclr to mat_orig before overwriting cmo/printatt mo itetclr minmax intrp / map / mo ielemclr / 1,0,0 / mo_ice itetclr # CHECK nodes should be values 30 and 31 (outside ice) cmo / printatt / mo / ielemclr / minmax # Find nodes set with ice value 30 cmo/select/mo pset / p_ice / attribute / ielemclr / 1,0,0 / eq / 30 # Find elements with nodes set to ice # note inclusion or exclusion options select more or less eltset / e_ice / inclusive / pset get p_ice #eltset / e_ice / exclusive / pset get p_ice # Find elements in layers where ice exists # Note Material order 1 at top to bottom n define MAX_ICELAYER 4 eltset e_all itetclr ge 1 eltset / e_maxl / itetclr / gt / MAX_ICELAYER # CHECK bounds of ice over all materials eltset e_all_e30 inter e_ice e_all # Find elements of ice in permitted layers only eltset / e30 / inter / e_ice e_maxl # set itetclr to ice material cmo / setatt / mo / itetclr / eltset,get,e30 / 30 dump / proto_full_poly.exo / mo dump / proto_full_poly.gmv / mo dump / proto_full_poly.inp / mo ############# CHECK FINAL MESH ####################### # Full stacked mesh cmo/printatt mo itetclr minmax cmo/printatt mo mat_orig minmax cmo/printatt mo -xyz- minmax # ice wedge mesh object cmo/printatt mo_ice itetclr minmax cmo/printatt mo_ice mat_orig minmax cmo/printatt mo_ice -xyz- minmax # merge for viewing in same space cmo setatt mo itetclr 1 cmo setatt mo_ice itetclr 2 addmesh/merge/mo_merge / mo / mo_ice dump gmv ck_merge_full_ice.gmv mo_merge # DONE # Final Files: # proto_full_poly.exo # proto_full_poly.gmv # proto_full_poly.inp finish