reset reset aprepro #{Nrefine = 0} #{nx = 4} #{ny = 4} #{dx = 0.02} #{dy = 0.02} #{n = 0} #{it = nx*ny} #{ix = 1} #{iy = 1} #{loop(it)} #{if(ix==nx+1)} #{ix = 1} #{iy++} #{endif} #{n++} #{cx = 0.5*((ix-1)/(nx)+ix/(nx))} #{cy = 0.5*((iy-1)/(ny)+iy/(ny))} create surface rectangle width {dx} height {dy} zplane move surface {n} location {cx} {cy} 0 include_merged #{ix++} #{endloop} create surface rectangle width 1 height 1 zplane move surface {n+1} location 0.5 0.5 0 include_merged merge all imprint all imprint all merge all surface all size {dx} surface all scheme submap mesh surface all #{loop(Nrefine)} refine surface all numsplit 1 bias 1.0 depth 1 #{endloop} sideset 1 add curve 65, 66, 67, 68 block 1 add surface all block 1 element type quad export mesh "sbmesh.e" overwrite