# Test the sorting changes to the intersect command. In particular, these tests # should make sure that sort / / line_graph is run properly on the result of the # surface intersection. # Note: The test segfaults toward the end, apparently due to a pre-existing bug # in LaGriT. This should eventually be fixed. # Input files: # test02.inp - a sinusoidal surface # Output files: # Test 01 - intersection of two planes # Test 02 - intersect plane and a sinusoidal surface # Test 03 - intersect elements # Create input meshes cmo / create / mo_s1 / / / triplane createpts / xyz / 11 11 1 / 0. 0. 0. / 1. 1. 1. / 1 1 1 cmo/setatt/mo_s1/imt 1 connect cmo/setatt/mo_s1/itetclr 1 resetpts/itp # Make a copy of the mesh and rotate it about a line. cmo / copy / mo_s2 / mo_s1 cmo select mo_s2 rotateln / 1 0 0 / nocopy / .5 -1.0 0.0 / .6 2.0 0.0 / 45.0 cmo / printatt / mo_s1 / -xyz- / minmax cmo / printatt / mo_s2 / -xyz- / minmax # Test 01 # Intersect the two meshes. Afterward mo_line should have its edges sorted and # should have attributes cid, ctype, and loop_id set properly. # output single line intersect / mo_line / mo_s1 / mo_s2 cmo / status * dump / avs / output_test01.inp / mo_line / 1 1 0 0 # Create input mesh for Test 02 cmo / create / mo_plane / / / triplane createpts / xyz / 11 11 1 / 0. 0. 0. / 10. 20. 0. / 1 1 1 cmo/setatt/mo_plane imt 1 connect cmo/setatt/mo1/itetclr 1 resetpts/itp * dump input_sheet2.inp mo_plane # read input mesh for Test 02 read / input_test02.inp / mo_surf cmo / printatt / mo_plane / -xyz- / minmax cmo / printatt / mo_surf / -xyz- / minmax # Test 02 # Intersect with sinusoidal surface # Check attributes (see image) # output multiple lines intersect / mo_lines / mo_plane / mo_surf cmo/printatt/mo_lines/ cid minmax cmo/printatt/mo_lines/ ctype minmax cmo/printatt/mo_lines/ loopid minmax * dump / output_test02.inp / mo_lines # Test 03 # find intersected elements intersect_elements/ mo_s1 / mo_s2 / xsect cmo / select / mo_s1 eltset / e_obj / xsect / gt / 0 cmo/setatt/mo_s1/itetclr/ eltset,get,e_obj 2 * dump/ output_test03.inp / mo_s1 finish