*--* ex_intersect_surface_make_hole *--* Header Begin *--* LAGriT Example Input file * Carl Gable * gable -at- lanl -dot- gov * * *--* Intersect a triangulated surface mesh with another triangulation *--* Compute the intersection points *--* Add the intersection points to the surface mesh *--* Re-triangulate the surface mesh *--* Assign material ID's to triangles have distinct material boundary information. *--* Smooth and refine the mesh *--* *--* Calls: *--* lagrit.input_build_shell *--* lagrit.input_smash_shell *--* lagrit.input_build_quads *--* lagrit.input_refine_smooth *--* *--* Geometry definition in: *--* lagrit.input_geom *--*---------------------------------------------------- *--* Header End *--* ex_intersect_surface_make_hole *--* * * Create a spherical shell of triangles * * Build a tet sphere mesh and extract the exterior as a triangle mesh * infile lagrit.input_build_shell dump / gmv / sphere_tri.gmv / cmo_tri * * Change the shape of the sphere * infile lagrit.input_smash_shell dump / gmv / sphere_tri_invert.gmv / cmo_tri * * Build the quad surface for computing intersection with sphere * infile lagrit.input_build_quads * intersect / cmo_line / cmo_surf / cmo_tri * dump / gmv / intersect_line.gmv / cmo_line * define/NX/ 26 define/NY/ 26 * * Create the quad surfaces * cmo/create/cmo_2///tri cmo/setatt/cmo_2/ndimensions_geom/1 0 0/2 * surface / s_cres / reflect / sheet / cmo_tri region / rin / le s_cres region / rout / gt s_cres mregion / mrin / le s_cres mregion / mrout / gt s_cres * cmo / create / cmo_quad_pts / / / quad quadxy NX NY/MIN MIN 0./MAX MIN 0./MAX MAX 0./MIN MAX 0. * cmo / create / cmo_quad_pts2 / / / quad * * Add in some points so the smooth/recon has more nodes * to work with. * quadxy 10 10 /-1.95 -0.1 0.0 / -1.89 -0.1 0.0 & /-1.89 0.1 0.0 / -1.95 0.1 0.0 * * Copy the points into a single MO * copypts / cmo_2 / cmo_line copypts / cmo_2 / cmo_quad_pts copypts / cmo_2 / cmo_quad_pts2 * cmo / delete / cmo_line cmo / delete / cmo_quad_pts cmo / delete / cmo_quad_pts2 * cmo / select / cmo_2 * cmo/setatt/cmo_2/imt/1 0 0/1 cmo/setatt/cmo_2/itp/1 0 0/0 cmo/setatt/cmo_2/icr/1 0 0/0 * * Triangulate the points * setpts setsize connect/delaunay * * Set the material ID of the triangles settets / geometry * * Output the triangulation * dump / gmv / surf_with_pts.gmv / cmo_2 * * Smooth the mesh * cmo / select / cmo_2 cmo / copy / cmo_2_save / cmo_2 cmo / select / cmo_2 * * Run 10 iterations of smoothing * loop / do / NL 1 10 1 / loop_end & infile lagrit.input_refine_smooth * dump / gmv / smooth.gmv / cmo_2 finish