#!python cubit.cmd('brick x 2 y 1 z 2') cubit.cmd('#{Domain = Id("volume")}') cubit.cmd('#{dx = 1/8}') cubit.cmd('#{meshSize = dx}') cubit.cmd('move vol {Domain} x 1 y 0.5 z 1') cubit.cmd('create vertex 0 0 {1-dx} on curve 9') cubit.cmd('#{v00 = Id("vertex")}') cubit.cmd('create vertex 0 0 {1+dx} on curve 9') cubit.cmd('#{v01 = Id("vertex")}') cubit.cmd('create vertex {2*dx} 0 {1-dx} on surface 3') cubit.cmd('#{v02 = Id("vertex")}') cubit.cmd('create vertex {2*dx} 0 {1+dx} on surface 3') cubit.cmd('#{v03 = Id("vertex")}') cubit.cmd('create curve vertex {v00} vertex {v02} on surface 3') cubit.cmd('#{c00 = Id("curve")}') cubit.cmd('create curve vertex {v02} vertex {v03} on surface 3') cubit.cmd('#{c01 = Id("curve")}') cubit.cmd('create curve vertex {v03} vertex {v01} on surface 3 ') cubit.cmd('#{c02 = Id("curve")}') cubit.cmd('imprint curve {c00} {c01} {c02} with surface 3') cubit.cmd('#{patchLC = Id("surface")}') cubit.cmd('surface {patchLC} copy move x {1-dx} y 0 z 0') cubit.cmd('surface {patchLC} copy move x {1-dx} y 0 z {1-dx}') cubit.cmd('surface {patchLC} copy move x {1-dx} y 0 z {-1+dx}') cubit.cmd('surface {patchLC} copy move x {2-2*dx} y 0 z 0') cubit.cmd('imprint body all') cubit.cmd('delete body 2 3 4 5') cubit.cmd('## Unimportant sides and top.') cubit.cmd('sideset 1 add surface 1') cubit.cmd('sideset 2 add surface 2') cubit.cmd('sideset 3 add surface 4') cubit.cmd('sideset 4 add surface 6') cubit.cmd('sideset 5 add surface 5') cubit.cmd('## Bottom with 5 patches cut out.') cubit.cmd('sideset 6 add surface 13') cubit.cmd('## left center, right center, center front, center back, center center') cubit.cmd('sideset 7 add surface 8') cubit.cmd('sideset 8 add surface 14') cubit.cmd('sideset 9 add surface 15') cubit.cmd('sideset 10 add surface 16') cubit.cmd('sideset 11 add surface 17') cubit.cmd('volume all size {meshSize}') cubit.cmd('mesh volume all') cubit.cmd('set exodus netcdf4 off') cubit.cmd('set large exodus on') cubit.cmd('export mesh "/scratch/dpkouri/ROL-Trilinos/packages/rol/example/PDE-OPT/topo-opt/elasticity/wheel0.e" overwrite')