() |
## Purpose : This file provides an example of a call to the# function fem_renum_elem_1()## This session file creates a new database by# name new.db. Four nodes and four bar elements# using the nodes are created. This function is# then called to renumber the element identifiers# to consecutive odd numbers.## 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_renum_elem()# has the following arguments:## fem_renum_elem_1# ( original_selection,# new_selection,# flag,
# created_selection )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_original_selection[128]STRING s_new_selection[128]STRING sv_created_selection[VIRTUAL]STRING sv_fem_nodes_created[VIRTUAL]STRING s_fem_elements_created[32]INTEGER i_return_valueINTEGER i_flag
#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create 4 nodes without associating with any geometryi_return_value = @ fem_create_nodes @ ( "Coord 0", "Coord 0", FALSE, "1", @ "[2 2 0][1 7 0][9 6 0][8 1 0]", sv_fem_nodes_created) dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Create 4 bar elements using the nodes#i_return_value = @ fem_create_elems @ ( "Bar ", "Bar2", "1", "Standard", TRUE, @ "Node 1 2 3 4", "Node 2 3 4 1", "", "", @ "", "", "", "", s_fem_elements_created)dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue.sf_pause()#---------------------------------------------------------------------# Renumber the elements to consecutive odd numberss_original_selection = "Elm 1:4"s_new_selection = "1 3 5 7"i_return_value = @fem_renum_elem_1 @
( s_original_selection, @ s_new_selection, @ sv_created_selectioni_flag)
dump i_return_valuedump sv_created_selectionsys_free_string(sv_created_selection)sys_free_string(sv_fem_nodes_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_renum_node_1()## This session file creates a new database by# name new.db. Four nodes are created first. This# function is then called to renumber the node# identifiers to consecutive even numbers.## 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_renum_node()# has the following arguments:## fem_renum_node_1# ( original_selection,# new_selection,# created_selection,# flag)
##---------------------------------------------------------------------# Variable DeclarationsSTRING s_original_selection[32]STRING s_new_selection[32]STRING sv_created_selection[VIRTUAL]STRING sv_fem_nodes_created[VIRTUAL]INTEGER i_return_valueINTEGER i_flag
#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create 4 nodes without associating with any geometryi_return_value = @ fem_create_nodes @ ( "Coord 0", "Coord 0", FALSE, "1", @ "[2 2 0][1 7 0][9 6 0][8 1 0]", sv_fem_nodes_created) dump i_return_valuenode_label( TRUE )#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue.sf_pause()#---------------------------------------------------------------------# Renumber the nodes to consecutive even numberss_original_selection = "Node 1:4"s_new_selection = "2 4 6 8"i_return_value = @fem_renum_node_1 @
( s_original_selection, @ s_new_selection, @ sv_created_selection i_flag)
dump i_return_valuedump sv_created_selectionsys_free_string(sv_created_selection)sys_free_string(sv_fem_nodes_created)#---------------------------------------------------------------------