# use sin function to make wave surface # extract boundary polygon # crop to small subset define / XMAX / 20. define / YMAX / 10. define / NX / 41 define / NY / 21 define / NXM1 / 40 define / NYM1 / 20 define / XMAX / 40. define / NX / 81 define / YMAX / 20. define / NY / 41 cmo / create / mo1 / / / triplane createpts / xyz / NX NY 1 / 0. 0. 0. / XMAX YMAX 0.0 / 1 1 1 # createpts / xyz / NXM1 NYM1 1 / 0. 0. 0. / XMAX YMAX 0.0 / 0 0 0 # subset pset/py/attribute yic/1,0,0/ gt 3.5 pset/px/attribute xic/1,0,0/ gt 12. pset/pdel/ union py px rmpoint pset,get,pdel; rmpoint compress; cmo / setatt / mo1 / imt / 1 0 0 / 1 cmo / setatt / mo1 / itp / 1 0 0 / 0 connect resetpts / itp cmo / setatt / mo1 / itetclr / 1 0 0 / 1 * * Use the math command to set the z coordinates to: * * cmo_1 z(i)=sin(y(i)) * cmo_2 z(i)=sin(x(i)) * cmo / addatt / mo1 / elev / vdouble / scalar / nnodes cmo / addatt / mo1 / var1 / vdouble / scalar / nnodes cmo / addatt / mo1 / var2 / vdouble / scalar / nnodes define MULT_VAL .2 math/sin/mo1/var1/1,0,0/mo1/yic math/sin/mo1/var2/1,0,0/mo1/xic math / add / mo1 / zic / 1 0 0 / mo1 / var1 / mo1 / var2 # math / mult / mo1 / zic / 1 0 0 / mo1 / zic / 0.2 math / mult / mo1 / zic / 1 0 0 / mo1 / zic / MULT_VAL cmo/setatt//ipolydat/no cmo / printatt / mo1 / zic / minmax cmo copyatt/ mo1 mo1/ elev zic dump / surf_wave.gmv / mo1 dump / surf_wave.inp / mo1 # EXTRACT POLYGON BOUNDARY define CMO_SURF mo1 cmo setatt CMO_SURF zic 0. resetpts itp extract/surfmesh/1,0,0/mos2/CMO_SURF dump gmv tmp_2D_lines.gmv mos2 cmo select mos2 filter 1,0,0; rmpoint compress # line id and node id must be sorted for polyline sort/mos2/line_graph/ascending/ikey/elements reorder mos2 ikey sort/mos2/line_graph/ascending/nkey/node reorder mos2 nkey dump bndry_line.inp mos2 dump bndry_line.gmv mos2 finish