() |
## Purpose : This file provides an example of a call to the# function fem_equiv_all_group()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is then called to reduce all the# nodes that coexist at single points to single# nodes.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_all_group()# has the following arguments:## fem_equiv_all_group# ( group_id,# num_groups,# tolerance_type,# tolerance,# updated_tolerance,# segment_id )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_group_id(1)INTEGER i_num_groupsINTEGER i_tolerance_typeREAL r_toleranceREAL r_updated_toleranceINTEGER i_segment_idINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Equivalence all the nodes#ia_group_id = [0]i_num_groups = 0i_tolerance_type = 1r_tolerance = 0.005i_return_value = @ fem_equiv_all_group @ ( ia_group_id, @ i_num_groups, @ i_tolerance_type, @ r_tolerance, @ r_updated_tolerance, @ i_segment_id )dump i_return_valuedump r_updated_tolerancedump i_segment_idsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_equiv_all_group2()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is then called to reduce all the# nodes that coexist at single points to single# nodes.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_all_group2()# has the following arguments:## fem_equiv_all_group2# ( group_id,# num_groups,# tolerance_type,# tolerance,# verify,# updated_tolerance,# segment_id )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_group_id(1)INTEGER i_num_groupsINTEGER i_tolerance_typeREAL r_toleranceLOGICAL l_verifyREAL r_updated_toleranceINTEGER i_segment_idINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Equivalence all the nodes#ia_group_id = [0]i_num_groups = 0i_tolerance_type = 1r_tolerance = 0.005l_verify = TRUEi_return_value = @ fem_equiv_all_group2 @ ( ia_group_id, @ i_num_groups, @ i_tolerance_type, @ r_tolerance, @ l_verify, @ r_updated_tolerance, @ i_segment_id )dump i_return_valuedump r_updated_tolerancedump i_segment_idsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_equiv_all_group3()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is then called to reduce all the# nodes that coexist at single points to single# nodes.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_all_group3()# has the following arguments:## fem_equiv_all_group3# ( group_names,# num_groups,# crg,
# tolerance_type,# tolerance,# verify,# updated_tolerance,# segment_id )##---------------------------------------------------------------------# Variable DeclarationsSTRING sa_group_names[32](0)INTEGER i_num_groupsSTRING sa_crgINTEGER i_tolerance_typeREAL r_toleranceLOGICAL l_verifyREAL r_updated_toleranceINTEGER i_segment_idINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Equivalence all the nodes#sa_group_names = [""]i_num_groups = 0s_exclude_select = "Node 6 7"i_tolerance_type = 1r_tolerance = 0.005l_verify = TRUEi_return_value = @ fem_equiv_all_group3 @ ( sa_group_names, @ i_num_groups, @ s_exclude_select, @ i_tolerance_type, @ r_tolerance, @ l_verify, @ r_updated_tolerance, @ i_segment_id )dump i_return_valuedump r_updated_tolerancedump i_segment_idsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_equiv_list()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is then called to reduce all the# selected nodes that coexist at single point to# a single node.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_list()# has the following arguments:## fem_equiv_list# ( node_select,# tolerance_type,# tolerance,# updated_tolerance,# segment_id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]INTEGER i_tolerance_typeREAL r_toleranceREAL r_updated_toleranceINTEGER i_segment_idINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Equivalence the selected nodes#s_node_select = "Node 1:13"i_tolerance_type = 1r_tolerance = 0.005i_return_value = @ fem_equiv_list @ ( s_node_select, @ i_tolerance_type, @ r_tolerance, @ r_updated_tolerance, @ i_segment_id )dump i_return_valuedump r_updated_tolerancedump i_segment_idsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_equiv_list2()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is then called to reduce all the# selected nodes that coexist at single point to# a single node.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_list2()# has the following arguments:## fem_equiv_list2# ( node_select,# tolerance_type,# tolerance,# verify,# updated_tolerance,# segment_id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]INTEGER i_tolerance_typeREAL r_toleranceLOGICAL l_verifyREAL r_updated_toleranceINTEGER i_segment_idINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Equivalence the selected nodes#s_node_select = "Node 1:13"i_tolerance_type = 1r_tolerance = 0.005l_verify = TRUEi_return_value = @ fem_equiv_list2 @ ( s_node_select, @ i_tolerance_type, @ r_tolerance, @ l_verify, @ r_updated_tolerance, @ i_segment_id )dump i_return_valuedump r_updated_tolerancedump i_segment_idsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_equiv_list3()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is then called to reduce all the# selected nodes that coexist at single point to# a single node.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_list3()# has the following arguments:## fem_equiv_list3# ( node_select,# exclude_select,# tolerance_type,# tolerance,# verify,# updated_tolerance,# segment_id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]STRING s_exclude_select[32]INTEGER i_tolerance_typeREAL r_toleranceLOGICAL l_verifyREAL r_updated_toleranceINTEGER i_segment_idINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Equivalence the selected nodes#s_node_select = "Node 1:13"s_exclude_select = "Node 1 13"i_tolerance_type = 1r_tolerance = 0.005l_verify = TRUEi_return_value = @ fem_equiv_list3 @ ( s_node_select, @ s_exclude_select, @ i_tolerance_type, @ r_tolerance, @ l_verify, @ r_updated_tolerance, @ i_segment_id )dump i_return_valuedump r_updated_tolerancedump i_segment_idsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function fem_equiv_list_display.plot()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is called to save the display and# erase all FEM entities. The function is then# called again to plot only the nodes associated# to free edges.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_list_display.plot()# has the following arguments:## fem_equiv_list_display.plot# ( plot_option,# entity_type,# entity_selection )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_option[9]INTEGER i_entity_typeSTRING sv_entity_selection[VIRTUAL]INTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue.sf_pause()#---------------------------------------------------------------------# Save the display and erase all FEM entities#s_plot_option = "init"i_entity_type = 0i_return_value = @ fem_equiv_list_display.plot @ ( s_plot_option, @ i_entity_type, @ sv_entity_selection )dump i_return_valuedump sv_entity_selection#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue.sf_pause()#---------------------------------------------------------------------# Plot nodes associated to free edges#s_plot_option = "free_edge"i_entity_type = 1i_return_value = @ fem_equiv_list_display.plot @ ( s_plot_option, @ i_entity_type, @ sv_entity_selection )dump i_return_valuedump sv_entity_selectionsys_free_string(sv_entity_selection)sys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_equiv_preview()## This session file creates a new database by the# name new.db. Two curves are created and meshed.# This function is called to preview the effect# of equivalencing the nodes. Nodes are counted# before and after preview to demonstrate that# no actual reduction has taken place.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function fem_equiv_preview()# has the following arguments:## fem_equiv_preview# ( node_select,# exclude_select,# tolerance_type,# tolerance,# entity_type,# updated_tolerance,# segment_id,# nodes_previewed,# elements_previewed,# nodes_reduced,# elements_reduced )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]STRING s_exclude_select[32]INTEGER i_tolerance_typeREAL r_toleranceINTEGER i_entity_typeREAL r_updated_toleranceINTEGER i_segment_idSTRING sv_nodes_previewed[VIRTUAL]STRING sv_elements_previewed[VIRTUAL]STRING sv_nodes_reduced[VIRTUAL]STRING sv_elements_reduced[VIRTUAL]INTEGER i_num_nodesINTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]STRING sv_entity_selection[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create three points for creating curvesi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 4 0][5 4 0][3 5 0]", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create the two curvesi_return_value = @ asm_const_line_2point @ ( "1", "Point 2 ", "Point 1 ", 0, "", @ 50., 1, sv_created_ids) dump i_return_valuei_return_value = @ sgm_const_curve_arc3point @ ( "2", FALSE, "Point 1 ", "Point 3", @ "Point 2 ", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Mesh the two curvesi_return_value = @ fem_create_mesh_curv @ ( "Curve 1 2", 1., "Bar2", "1", @ "1", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_elements, @ sv_fem_nodes_created, sv_fem_elements_created)dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Count the nodes#i_return_value = @ db_count_nodes ( i_num_nodes )dump i_return_valuedump i_num_nodes#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue.sf_pause()#---------------------------------------------------------------------# Erase all FEM entities from the viewport#i_return_value = @ fem_equiv_list_display.plot @ ( "init", 0, sv_entity_selection )dump i_return_value#---------------------------------------------------------------------# Preview the effect of equivalencing#s_node_select = "Node 1:13"s_exclude_select = "Node 1 13"i_tolerance_type = 1r_tolerance = 0.005i_entity_type = 1i_return_value = @ fem_equiv_preview @ ( s_node_select, @ s_exclude_select, @ i_tolerance_type, @ r_tolerance, @ i_entity_type, @ r_updated_tolerance, @ i_segment_id, @ sv_nodes_previewed, @ sv_elements_previewed, @ sv_nodes_reduced, @ sv_elements_reduced )dump i_return_valuedump r_updated_tolerancedump i_segment_iddump sv_nodes_previeweddump sv_elements_previeweddump sv_nodes_reduceddump sv_elements_reducedsys_free_string(sv_nodes_previewed)sys_free_string(sv_elements_previewed)sys_free_string(sv_nodes_reduced)sys_free_string(sv_elements_reduced)sys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)sys_free_string(sv_entity_selection)#---------------------------------------------------------------------# Count the nodes again#i_return_value = @ db_count_nodes ( i_num_nodes )dump i_return_valuedump i_num_nodes#---------------------------------------------------------------------