*--* ex_sphere_offset_sphere_in_box *--* Header Begin *--* LAGriT Example Input file * Carl Gable * gable -at- lanl -dot- gov * * *--*---------------------------------------------------- *--* Create a mesh with three materials. One material *--* is a sphere, the next is a sphere offset from the *--* first and the third material is a box outside *--* the sphere. This example shows how the connect algorithm *--* adds points at the material interface to break *--* multi-material edges. It also shows that the resolution *--* of the point distribution in the 'createpts' command *--* has an impact on on how well the connect algorithm *--* resolves the geometry. *--* *--* Note: if this was a real grid, one would use a spherical *--* point distribution but this is designed to illustrate. *--* *--* A more careful choice of point distribution would improve *--* the final result. *--* *--* The final mesh quality is improved with MASSAGE. The final *--* step of massage has a large damage tolerance so there is *--* some degredation of the geometry. *--* *--*---------------------------------------------------- *--* Header End *--* ex_sphere_offset_sphere_in_box *--* * Create the mesh object data structure. cmo / create / cmotet / / / tet * Define surfaces surface / sbbox / reflect / box / -1. -1. -1. / 1. 1. 1. surface / ssphere / intrface / sphere / 0. 0. 0. 0.3 surface / ssphere2/ intrface / sphere / 0. 0. 0.15 0.25 * Define regions region / rin / le ssphere region / rin2/ gt ssphere and le ssphere2 region / rout / le sbbox and gt ssphere and gt ssphere2 * Define material regions mregion / mrin / lt ssphere mregion / mrin2/ gt ssphere and lt ssphere2 mregion / mrout / le sbbox and gt ssphere and gt ssphere2 * Create a grid of points define / NP / 21 define / MX / 0.5 * createpts / xyz / NP NP NP / -.5 -.5 -.5 / MX MX MX / 1 1 1 createpts / xyz / NP NP NP / 0.0 -.5 -.5 / MX MX MX / 1 1 1 createpts / xyz / NP NP NP / 0.0 0.0 0.0 / MX MX MX / 1 1 1 * * Use filter to remove duplicate points filter / 1 0 0 rmpoint / compress * Assign imt (integer material type) values to nodes setpts dump / gmv / points.gmv / cmotet * Connect the mesh connect * Assign itetclr (integer material type) values to elements. settets resetpts / itp quality * * Output mesh * dump / gmv / connect.gmv / cmotet * * Run some MASSAGE (refine/derefine) iterations * massage / 0.1 / 0.002 / 0.0001 quality * dump / gmv / massage1.gmv / cmotet massage / 0.1 / 0.02 / 0.0001 quality * dump / gmv / massage2.gmv / cmotet massage / 0.1 / 0.02 / 0.001 quality * dump / gmv / massage3.gmv / cmotet massage / 0.1 / 0.02 / 0.01 quality * dump / gmv / massage4.gmv / cmotet finish