() |
## Purpose : This file provides an example of a call to the# function fields_create()## This function creates a new field.## In this example a new database is opened and# a field is created. The field is showed in# the end.## 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 fields_create()# has the following arguments:## fields_create# ( name,# obj_type,# extrap_method,# type,# coord_type,# coord,# geom_entity,# defn_type,# nvar,# ivar1,# ivar2,# ivar3,# fn1,# fn2,# fn3,# lin_def,# vals_1,# vals_2,# vals_3,# vals )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]STRING s_obj_type[32]INTEGER i_extrap_methodSTRING s_type[32]STRING s_coord_type[32]STRING s_coord[32]STRING s_geom_entity[32]STRING s_defn_type[32]INTEGER i_nvarSTRING s_ivar1[32]STRING s_ivar2[32]STRING s_ivar3[32]STRING s_fn1[32]STRING s_fn2[32]STRING s_fn3[32]LOGICAL l_lin_defREAL ra_vals_1(5)REAL ra_vals_2(1)REAL ra_vals_3(1)REAL ra_vals(5,1,1)INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create Fields_name = "NEW_FIELD"s_obj_type = "Spatial"i_extrap_method = 1s_type = "Scalar"s_coord_type = "Real"s_coord = "Coord 0"s_geom_entity = ""s_defn_type = "Table"i_nvar = 1s_ivar1 = "X"s_ivar2 = ""s_ivar3 = ""s_fn1 = ""s_fn2 = ""s_fn3 = ""l_lin_def = FALSEra_vals_1 = [1., 2., 3., 4., 5.]ra_vals = [[[11.]][[22.]][[33.]][[44.]][[55.]]]i_return_value = @ fields_create @ ( s_name, @ s_obj_type, @ i_extrap_method, @ s_type, @ s_coord_type, @ s_coord, @ s_geom_entity, @ s_defn_type, @ i_nvar, @ s_ivar1, @ s_ivar2, @ s_ivar3, @ s_fn1, @ s_fn2, @ s_fn3, @ l_lin_def, @ ra_vals_1, @ ra_vals_2, @ ra_vals_3, @ ra_vals )dump i_return_value# Show Fieldi_return_value = fields_show( "NEW_FIELD", "X", 0., 5., 11, 0., @ 0., 0, 0., 0., 0, FALSE, TRUE, 1 )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_create_general()## This function creates a new general field.## In this example a new database is opened and# paused for the user to observe the Field# Form. On resuming, this function is called# to create a new general field (GENERAL_FIELD),# which appears immediately in the Field# form.## 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 fields_create_general() has the following arguments:## fields_create_general# ( name,# object,# method,# extrap_method,# coord_type,# coord,# geom_entity,# nvar,# ivar1,# ivar2,# ivar3 )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]INTEGER i_objectINTEGER i_methodINTEGER i_extrap_methodSTRING s_coord_type[32]STRING s_coord[32]STRING s_geom_entity[32]INTEGER i_nvarINTEGER i_ivar1INTEGER i_ivar2INTEGER i_ivar3INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Activate "Fields" of Application radio button and observe# the names of available Fields# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Create field "GENERAL_FIELD"s_name = "GENERAL_FIELD"i_object = 0i_method = 5i_extrap_method = 2s_coord_type = "Real"s_coord = "Coord 0"s_geom_entity = ""i_nvar = 1i_ivar1 = 1i_ivar2 = 0i_ivar3 = 0i_return_value = @ fields_create_general @ ( s_name, @ i_object, @ i_method, @ i_extrap_method, @ s_coord_type, @ s_coord, @ s_geom_entity, @ i_nvar, @ i_ivar1, @ i_ivar2, @ i_ivar3 )dump i_return_value# Create term for the general field,"GENERAL_FIELD"i_return_value = fields_create_general_term( s_name, 0, 0, 0, 8,@ "10*’X" )dump i_return_value# Refresh all forms that are currently visibleui_wid_refresh()# Note the changes in the Fields form#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_create_general_term()## This function creates a term for a general# field in the database.## In this example a new database is opened and# a general field (GENERAL_FIELD) is created.# Then this function is called to create a term# for GENERAL_FIELD. The user is instructed to# view the term in Field form.## 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 fields_create_general_term() has the following# arguments:## fields_create_general_term# ( name,# term_fld_id,# term_type,# term_id,# data_length,# data )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]INTEGER i_term_fld_idINTEGER i_term_typeINTEGER i_term_idINTEGER i_data_lengthSTRING s_data[32]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create field "GENERAL_FIELD"i_return_value = fields_create_general( "GENERAL_FIELD", 0, 5, @ 2, "Real", "Coord 0", "", 1, 1, 0, 0)dump i_return_value#---------------------------------------------------------------------# Create term for the general field,"GENERAL_FIELD"s_name = "GENERAL_FIELD"i_term_fld_id = 0i_term_type = 0i_term_id = 0i_data_length = 8s_data = "10*’X"i_return_value = @ fields_create_general_term @ ( s_name, @ i_term_fld_id, @ i_term_type, @ i_term_id, @ i_data_length, @ s_data )dump i_return_value# Refresh all forms that are currently visibleui_wid_refresh()#---------------------------------------------------------------------# Activate "Fields" of Application radio button. Then select the# field "GENERAL_FIELD" which shows up a form containing the TERM# in Text box titled - FUNCTION EXPRESSION#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_create_fem()## This function creates a new FEM field in the# database.## In this example the field database is opened# and result-fringe of displacements is posted.# Then this function is called to create FEM# field using the fringe plot.## Before running this session file run field.ses# to create field.db## 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 fields_create_fem() has the following arguments:## fields_create_fem# ( name,# group,# type,# extrap_method,# coord,# result_flag )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]STRING s_group[32]STRING s_type[32]INTEGER i_extrap_methodSTRING s_coord[32]INTEGER i_result_flagINTEGER i_return_value#---------------------------------------------------------------------# Open a database "field.db"uil_file_open.go( "field.db" )i_return_value = ga_view_aa_set( -62.958218, -3.879048, -53.761284 )dump i_return_value#---------------------------------------------------------------------# Plot result fringe for displacementres_init_fringe_plot( )res_create_fringe_plot_rec3( 5, 2, 1, 1, 1, 1, 0, 0, 1., "", 1, @ 2, 3, 23, 1, 1, 0., 30, 0, 1 )i_return_value = res_make_fringe_plot( 1, [1], [1], [""], [0.], @ [ "Default, Static Subcase: Displacements, Translational"// @ "(VEC-MAG) -MSC.Nastran" ] )dump i_return_valueres_deinit_fringe_plot( )#---------------------------------------------------------------------# Activate "Field" of Application radio button and observe# the names of available fields# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Create Fem Fields_name = "NEW_FEM_FIELD"s_group = "default_group"s_type = "Scalar"i_extrap_method = 1s_coord = "Coord 0"i_result_flag = 0i_return_value = @ fields_create_fem @ ( s_name, @ s_group, @ s_type, @ i_extrap_method, @ s_coord, @ i_result_flag )dump i_return_value# Note the changes in the Field form#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_create_lbc()## This function creates a new LBC field in the# database.## In this example a new database is opened and# a cuboid is created. Then this function is# called to create an LBC field and the field# is displayed using function fields_show_lbc().## 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 fields_create_lbc()# has the following arguments:## fields_create_lbc# ( name,# entity_type,# type,# num_entities,# entities,# values )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]STRING s_entity_type[32]STRING s_type[32]INTEGER i_num_entitiesSTRING sa_entities[16](6)STRING sa_values[16](6)INTEGER i_return_valueSTRING sv_create_hpat_xyz_created_ids[VIRTUAL]INTEGER i_create_mesh_solid_num_nodesINTEGER i_create_mesh_solid_num_elemsSTRING sv_create_mesh_s_nodes_created[VIRTUAL]STRING sv_create_mesh_s_elems_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002i_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Cuboid ( 2 X 1 X 1 ) and Hex Meshi_return_value = asm_const_hpat_xyz( "1", "<2 1 1>", "[0 0 0]", @ "Coord 0", sv_create_hpat_xyz_created_ids )dump i_return_valuei_return_value = fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1",@ 1, [1.], "Hex8", "1", "1", "Coord 0", "Coord 0", @ i_create_mesh_solid_num_nodes, i_create_mesh_solid_num_elems,@ sv_create_mesh_s_nodes_created, sv_create_mesh_s_elems_created )# Display node labelnode_label(TRUE)#---------------------------------------------------------------------# Create LBC Fields_name = "LBC_FIELD"s_entity_type = "Node"s_type = "Scalar"i_num_entities = 6sa_entities(1) = "Node 4"sa_entities(2) = "Node 5"sa_entities(3) = "Node 6"sa_entities(4) = "Node 10"sa_entities(5) = "Node 11"sa_entities(6) = "Node 12"sa_values(1) = "40"sa_values(2) = "50"sa_values(3) = "60"sa_values(4) = "100"sa_values(5) = "110"sa_values(6) = "120"i_return_value = @ fields_create_lbc @ ( s_name, @ s_entity_type, @ s_type, @ i_num_entities, @ sa_entities, @ sa_values )dump i_return_value# Show Load/BC fieldi_return_value = fields_show_lbc( "LBC_FIELD" )dump i_return_valuesys_free_string( sv_create_hpat_xyz_created_ids)sys_free_string( sv_create_mesh_s_nodes_created)sys_free_string( sv_create_mesh_s_elems_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_delete()## This function deletes an existing field from# the database.## In this example a new database is opened and# paused after creation of a field(NEW_FIELD).# The user is instructed to to observe the Field# Form. On resuming, this function is called to# delete "NEW_FIELD"## 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 fields_delete() has the following arguments:## fields_delete# ( num_fields,# del_fields )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_num_fieldsSTRING sa_del_fields[32](1)INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create Fieldi_return_value = fields_create( "NEW_FIELD", "Spatial", 1, @ "Scalar", "Real", "Coord 0", "", "Table", 1, "X", "", "", "",@ "", "", FALSE, [1., 2., 3., 4., 5.], [0.], [0.], @ [[[11.]][[22.]][[33.]][[44.]][[55.]]] )dump i_return_value#---------------------------------------------------------------------# Activate "Field" of Application radio button and observe# the names of available fields.# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Delete FEM fieldi_num_fields = 1sa_del_fields(1) = "NEW_FIELD"i_return_value = @ fields_delete @ ( i_num_fields, @ sa_del_fields )dump i_return_value# Refresh all forms that are currently visibleui_wid_refresh()#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_modify()## In this example a new database is opened and# a field(NEW_FIELD) is created. The field is# then displayed. After a pause NEW_FIELD is# renamed(MODIFIED_FIELD) and the PCL equation# representing the field is changed using this# function and displayed again.## 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 fields_modify() has the following arguments:## fields_modify# ( old_name,# new_name,# obj_type,# extrap_method,# type,# coord_type,# coord,# geom_entity,# defn_type,# nvar,# ivar1,# ivar2,# ivar3,# fn1,# fn2,# fn3,# lin_def,# vals_1,# vals_2,# vals_3,# vals )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_old_name[32]STRING s_new_name[32]STRING s_obj_type[32]INTEGER i_extrap_methodSTRING s_type[32]STRING s_coord_type[32]STRING s_coord[32]STRING s_geom_entity[32]STRING s_defn_type[32]INTEGER i_nvarSTRING s_ivar1[32]STRING s_ivar2[32]STRING s_ivar3[32]STRING s_fn1[32]STRING s_fn2[32]STRING s_fn3[32]LOGICAL l_lin_defREAL ra_vals_1(1)REAL ra_vals_2(1)REAL ra_vals_3(1)REAL ra_vals(1,1,1)INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create Fieldi_return_value = fields_create( "NEW_FIELD", "Spatial", @ 1, "Scalar", "Real", "Coord 0", "", "Function", 1, "X", "", @ "", "10*’X", "", "", FALSE, [0.], [0.], [0.], [[[0.]]] )dump i_return_valuei_return_value = fields_show( "NEW_FIELD", "X", 0., 10., 11, 0.,@ 0., 0, 0., 0., 0, FALSE, TRUE, 1 )dump i_return_value# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Delete curve "NEW_FIELD" from XY windowi_return_value = xy_curve_delete( "NEW_FIELD" )dump i_return_value# Modify fields_old_name = "NEW_FIELD"s_new_name = "MODIFIED_FIELD"s_obj_type = "Spatial"i_extrap_method = 1s_type = "Scalar"s_coord_type = "Real"s_coord = "Coord 0"s_geom_entity = ""s_defn_type = "Function"i_nvar = 1s_ivar1 = "X"s_ivar2 = ""s_ivar3 = ""s_fn1 = "1111*’X"s_fn2 = ""s_fn3 = ""l_lin_def = FALSEi_return_value = @ fields_modify @ ( s_old_name, @ s_new_name, @ s_obj_type, @ i_extrap_method, @ s_type, @ s_coord_type, @ s_coord, @ s_geom_entity, @ s_defn_type, @ i_nvar, @ s_ivar1, @ s_ivar2, @ s_ivar3, @ s_fn1, @ s_fn2, @ s_fn3, @ l_lin_def, @ ra_vals_1, @ ra_vals_2, @ ra_vals_3, @ ra_vals )dump i_return_valuei_return_value = fields_show( "MODIFIED_FIELD", "X", 0., 10., @ 11, 0., 0., 0, 0., 0., 0, FALSE, TRUE, 1 )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_modify_lbc()## This function modifies an existing LBC field# in the database.## In this example a new database is opened and# an LBC field is created. The field is then# displayed and session is paused. After# resuming this function is called to modify# the created FEM field. The modified field is# displyed in the end.## 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 fields_modify_lbc() has the following arguments:## fields_modify_lbc# ( old_name,# new_name,# entity_type,# type,# num_entities,# entities,# values )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_old_name[32]STRING s_new_name[32]STRING s_entity_type[32]STRING s_type[32]INTEGER i_num_entitiesSTRING sa_entities[32](9)STRING sa_values[32](9)INTEGER i_return_valueSTRING sv_create_hpat_xyz_created_ids[VIRTUAL]INTEGER i_create_mesh_solid_num_nodesINTEGER i_create_mesh_solid_num_elemsSTRING sv_create_mesh_s_nodes_created[VIRTUAL]STRING sv_create_mesh_s_elems_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Cuboid ( 2 X 1 X 1 ) and Hex Meshi_return_value = asm_const_hpat_xyz( "1", "<2 1 1>", "[0 0 0]", @ "Coord 0", sv_create_hpat_xyz_created_ids )dump i_return_valuei_return_value = fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1",@ 1, [1.], "Hex8", "1", "1", "Coord 0", "Coord 0", @ i_create_mesh_solid_num_nodes, i_create_mesh_solid_num_elems,@ sv_create_mesh_s_nodes_created, sv_create_mesh_s_elems_created )# Display node labelnode_label(TRUE)#---------------------------------------------------------------------# Create Fieldi_return_value = fields_create_lbc( "LBC_FIELD", "Node", @ "Scalar", 3, ["Node 1", "Node 2", "Node 3"], @ ["10.", "20.", "30."] )# Show Fieldi_return_value = fields_show_lbc( "LBC_FIELD" )dump i_return_value# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Modify field "LBC_FIELD"s_old_name = "LBC_FIELD"s_new_name = "MODIFIED_LBC_FIELD"s_entity_type = "Node"s_type = "Scalar"i_num_entities = 9sa_entities(1) = "Node 1"sa_entities(2) = "Node 2"sa_entities(3) = "Node 3"sa_entities(4) = "Node 4"sa_entities(5) = "Node 5"sa_entities(6) = "Node 6"sa_entities(7) = "Node 7"sa_entities(8) = "Node 8"sa_entities(9) = "Node 9"sa_values(1) = "10"sa_values(2) = "20"sa_values(3) = "30"sa_values(4) = "40"sa_values(5) = "50"sa_values(6) = "60"sa_values(7) = "70"sa_values(8) = "80"sa_values(9) = "90"dump i_return_valuei_return_value = @ fields_modify_lbc @ ( s_old_name, @ s_new_name, @ s_entity_type, @ s_type, @ i_num_entities, @ sa_entities, @ sa_values )dump i_return_value# Show Fieldi_return_value = fields_show_lbc( "MODIFIED_LBC_FIELD" )dump i_return_valuesys_free_string( sv_create_hpat_xyz_created_ids)sys_free_string( sv_create_mesh_s_nodes_created)sys_free_string( sv_create_mesh_s_elems_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_modify_fem()## This function modifies an existing FEM field# in the database.## In this example the field database is opened# and result-fringe of displacements is posted.# Then a FEM field is created and paused. After# resuming the FEM field is renamed using this# function.## Before running this session file run field.ses# to create field.db## 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 fields_modify_fem() has the following arguments:## fields_modify_fem# ( old_name,# new_name,# group,# type,# extrap_method,# coord,# results_flag )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_old_name[32]STRING s_new_name[32]STRING s_group[32]STRING s_type[32]INTEGER i_extrap_methodSTRING s_coord[32]INTEGER i_results_flagINTEGER i_return_value#---------------------------------------------------------------------# Open a database "field.db"uil_file_open.go( "field.db" )i_return_value = ga_view_aa_set( -62.958218, -3.879048, -53.761284 )dump i_return_value#---------------------------------------------------------------------# Plot result fringesres_init_fringe_plot( )res_create_fringe_plot_rec3( 1, 2, 1, 1, 1, 1, 0, 0, 1., "", 1, @ 1, 3, 23, 1, 1, 0., 30, 0, 1 )i_return_value = res_make_fringe_plot( 1, [1], [1], [""], [0.], @ ["Default, Static Subcase: Constraint Forces,"// @ "Translational (VEC-MAG) -MSC.Nastran"] )dump i_return_valueres_deinit_fringe_plot( )#---------------------------------------------------------------------# Create Fem Fieldi_return_value = fields_create_fem( "NEW_FEM_FIELD", @ "default_group", "Scalar", 1, "Coord 0", 0 )dump i_return_value#---------------------------------------------------------------------# Activate "Fields" of Application radio button and observe# the names of available field# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Modify Fem Fields_old_name = "NEW_FEM_FIELD"s_new_name = "MODIFIED_FEM_FIELD"s_group = "default_group"s_type = "Scalar"i_extrap_method = 1s_coord = "Coord 0"i_results_flag = 0i_return_value = @ fields_modify_fem @ ( s_old_name, @ s_new_name, @ s_group, @ s_type, @ i_extrap_method, @ s_coord, @ i_results_flag )dump i_return_value# Note the changes in the field form#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_show()## This function shows an existing field in# tabular and XY plot format.## In this example a new dabase is opened and a# field is created. Then this function is# called to show the created field.## 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 fields_show()# has the following arguments:## fields_show# ( name,# ind_label,# ind_min,# ind_max,# ind_npts,# fixed1_min,# fixed1_max,# fixed1_npts,# fixed2_min,# fixed2_max,# fixed2_npts,# existing_pts_flag,# post_xy_flag,# vect_comp_val )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]STRING s_ind_label[32]REAL r_ind_minREAL r_ind_maxINTEGER i_ind_nptsREAL r_fixed1_minREAL r_fixed1_maxINTEGER i_fixed1_nptsREAL r_fixed2_minREAL r_fixed2_maxINTEGER i_fixed2_nptsLOGICAL l_existing_pts_flagLOGICAL l_post_xy_flagINTEGER i_vect_comp_valINTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create Fieldi_return_value = fields_create( "NEW_FIELD", "Spatial", 1, @ "Scalar", "Real", "Coord 0", "", "Table", 1, "X", "", "", "",@ "", "", FALSE, [1., 2., 3., 4., 5.], [0.], [0.], @ [[[11.]][[22.]][[33.]][[44.]][[55.]]] )dump i_return_value#---------------------------------------------------------------------# Show Fieldi_return_value = fields_show( "NEW_FIELD", "X", 0., 5., 11, 0., @ 0., 0, 0., 0., 0, FALSE, TRUE, 1 )dump i_return_values_name = "NEW_FIELD"s_ind_label = "X"r_ind_min = 0.r_ind_max = 5.i_ind_npts = 11l_existing_pts_flag = FALSEl_post_xy_flag = TRUEi_vect_comp_val = 1i_return_value = @ fields_show @ ( s_name, @ s_ind_label, @ r_ind_min, @ r_ind_max, @ i_ind_npts, @ r_fixed1_min, @ r_fixed1_max, @ i_fixed1_npts, @ r_fixed2_min, @ r_fixed2_max, @ i_fixed2_npts, @ l_existing_pts_flag, @ l_post_xy_flag, @ i_vect_comp_val )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fields_show_lbc()## This function shows an LBC field in tabular# format.## In this example a new database is opened and# an LBC field is created. Then this function# is called to show the created field.## 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 fields_show_lbc() has the following arguments:## fields_show_lbc# ( name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]INTEGER i_return_valueSTRING sv_create_hpat_xyz_created_ids[VIRTUAL]INTEGER i_create_mesh_solid_num_nodesINTEGER i_create_mesh_solid_num_elemsSTRING sv_create_mesh_s_nodes_created[VIRTUAL]STRING sv_create_mesh_s_elems_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002i_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Cuboid ( 2 X 1 X 1 ) and Hex Meshi_return_value = asm_const_hpat_xyz( "1", "<2 1 1>", "[0 0 0]", @ "Coord 0", sv_create_hpat_xyz_created_ids )dump i_return_valuei_return_value = fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1",@ 1, [1.], "Hex8", "1", "1", "Coord 0", "Coord 0", @ i_create_mesh_solid_num_nodes, i_create_mesh_solid_num_elems,@ sv_create_mesh_s_nodes_created, sv_create_mesh_s_elems_created )# Display node labelnode_label(TRUE)#---------------------------------------------------------------------# Create LBC Fieldi_return_value = fields_create_lbc( "LBC_FIELD", "Node", @ "Scalar", 6, ["Node 4","Node 5", "Node 6", "Node 10", @ "Node 11", "Node 12"], [ "40", "50", "60", "100", "110", "120"] )dump i_return_value# Show Load/BC fields_name = "LBC_FIELD"i_return_value = @ fields_show_lbc @ ( s_name )dump i_return_valuesys_free_string( sv_create_hpat_xyz_created_ids)sys_free_string( sv_create_mesh_s_nodes_created)sys_free_string( sv_create_mesh_s_elems_created)#---------------------------------------------------------------------