Tutorial Toolkit Function Descriptions > Finite Element Model > Finite Elements
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Finite Elements
  
db_get_next_elem_id
(id)
Description:
This function will return the next available element ID to the caller.
Input:
None.
Output:
INTEGER
id
The next available element ID.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
Please see db_get_next_elem_id (p. 726) in the MSC Acumen Toolkit - Code Example.
  
db_get_min_elem_id
(id)
Description:
This function will search the entire element list to find the minimum element ID currently in use.
Input:
None.
Output:
INTEGER
id
The minimum element ID currently in use.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
Please see db_get_min_elem_id (p. 722) in the MSC Acumen Toolkit - Code Example.
  
db_get_max_elem_id
(id)
Description:
This function will search the entire element list to find the maximum element ID currently in use.
Input:
None.
Output:
INTEGER
id
The maximum element ID currently in use.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
See example for db_get_min_elem_id, 266. See also db_get_max_elem_id (p. 719) in the MSC Acumen Toolkit - Code Example.
 
fem_get_elem_assoc_groups
(nelem, idelems, ngroups, ids)
  
Description:
Get a list of all the groups associated with the elements in the FEM_LIST
Input:
INTEGER
nelem
Number of elements.
INTEGER
idelems()
List of elements.
Output:
INTEGER
ngroups
Number of unique groups associated with elements.
INTEGER
ids()symbol
Pointer to VIRTUAL integer array containing list of associated group IDs.
INTEGER
<Return Value>
0 Function was successful.
-1 Abort
-2 No elements in list
-3 No associated groups
Error Conditions:
2001070
Unable to acquire %I% words of virtual memory.
4
Interrupted system call.
Example:
Please see fem_get_mpc_assoc_groups (p. 750) in the MSC Acumen Toolkit - Code Example.
  
fem_get_elem_ids
(entity_list, nelem, idelem, notfound, idnoexist)
Description:
Extract the array of existing element IDs from ELEM_LST.
Input:
STRING
entity_list[]
List of selected elements.
Output:
INTEGER
nelem
Number of existing element IDs.
INTEGER
idelem()symbol
Pointer to sorted Element IDs.
INTEGER
notfound
Number of elements that were not found.
INTEGER
idnoexist()symbol
Pointer to sorted list of nonexistent IDs.
INTEGER
<Return Value>
0 Function was successful.
-1 Abort.
-2 No existing elements in list.
Example:
See example for fem_get_elem_assoc_groups, 267. See also fem_get_elem_ids (p. 749) in the MSC Acumen Toolkit - Code Example.
 
fem_u_get_free_edges
( el_ids, max_nodes, max_per_edge, max_edges, nels, el_con, el_shape, el_nodes, edge_el_ids, edge_ids, free_edges )
  
Description:
Create a list of all free edges in a list of finite elements.
Input:
INTEGER
el_ids()
List of elements.
INTEGER
max_nodes
Maximum number of nodes per element in EL_IDS.
INTEGER
max_per_edge
Maximum number of nodes per edge in EL_IDS.
INTEGER
max_edges
Maximum number of edges per element in EL_IDS.
INTEGER
nels
Number of elements.
INTEGER
el_con()
Element node list (Connectivity).
INTEGER
el_shape()
Element shape array.
INTEGER
el_nodes()
Element node count array.
Output:
INTEGER
edge_el_ids()
Associated element id.
INTEGER
edge_ids()
Free edge ID.
INTEGER
free_edges
Number of free edges.
INTEGER
<Return Value>
0, no error.
1, Unsupported element type (shape/nodes).
2, Memory allocation error.
Example:
Please see fem_u_get_free_edges (p. 758) in the MSC Acumen Toolkit - Code Example.
  
fem_u_get_free_faces
(el_ids, max_nodes, max_per_face, max_faces, num_els, el_con, el_shape, el_nodes, face_el_ids, face_ids, free_faces)
Description:
This function will create a list of all free element faces in a list of solid finite elements.
Input:
INTEGER
el_ids(num_els)
This value specifies a list of solid element identifiers.
INTEGER
max_nodes
This value specifies the maximum number of nodes used by the elements specified by the input value el_ids.
INTEGER
max_per_face
This value specifies the maximum number of nodes used by the elements specified by the input value el_ids.
INTEGER
max_faces
This value specifies the maximum number of faces used by the elements specified by the input value el_ids.
INTEGER
num_els
This value specifies the number of offsets defined for the input value el_ids.
INTEGER
el_con(num_els * max_nodes)
This value specifies the solid element connectivity node list.
INTEGER
el_shape(num_els)
This value specifies the shapes of the solid elements.
INTEGER
el_nodes(num_els)
This value specifies the solid element node counts.
Output:
INTEGER
face_el_ids(max_faces * num_els)
This value returns the associated element identifiers.
INTEGER
face_ids(max_faces * num_els)
This value returns the free face identifiers.
INTEGER
free_faces
This value returns the number of free faces.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
1
An unsupported element shape or node type has been specified.
2
A memory allocation error has occurred.
Example:
Please see fem_u_get_free_faces (p. 760) in the MSC Acumen Toolkit - Code Example.
  
db_update_elem_ids
(numelem, old_id, new_id)
Description:
This function changes the ID of a list of elements.
Input:
INTEGER
numelem
The number of elements to be changed.
INTEGER
old_id()
The list of old element IDs.
INTEGER
new_id()
The list of new element IDs.
Output:
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
0
Successful Completion.
13000095
User Aborted Transaction In Progress.
13000118
The renumber specified could not complete.
Example:
Please see db_update_elem_ids (p. 740) in the MSC Acumen Toolkit - Code Example.
  
db_count_elems_for_geo
(geo_type, geo_id, nbr_of_elements)
Description:
Count the number of elements that have the given geometry type and ID.
Input:
INTEGER
geo_type
The geometry type to search for.
INTEGER
geo_id
The geometry ID to search for.
Output:
INTEGER
nbr_of_elements
The number of elements found.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
SUCCESS
This function completed successfully.
13000041
Element not found .
Example:
Please see db_count_elems_for_geo (p. 686) in the MSC Acumen Toolkit - Code Example.
  
db_update_elem_types
(nelem, mxnode, eid, etop, econ)
Description:
This function will update the given elements with the new element topology and create a set of new nodes for that element.
Input:
INTEGER
nelem
The number of elements to be created.
INTEGER
mxnode
The number of nodes on each element.
INTEGER
eid()
The array of element IDs to be used.
INTEGER
etop()
The array of element topologies to be used.
INTEGER
econ()
The array of node IDs for each element.
Output:
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
SUCCESS
This function completed successfully.
Example:
Please see db_update_elem_types (p. 741) in the MSC Acumen Toolkit - Code Example.
  
db_count_elem_topology_codes
(ntop)
Description:
This function will count the total number of element topologies currently defined in the system.
Input:
None.
Output:
INTEGER
ntop
The number of element topologies in the database.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
Please see db_count_elem_topology_codes (p. 684) in the MSC Acumen Toolkit - Code Example.
  
db_count_elem_w_topology
(ntop, top, nelem)
Description:
This function will count the number of elements that have the specified topologies. The maximum number of topologies that can be returned is passed in by the caller and the caller passes in the address of the output array.
Input:
INTEGER
ntop
The number of topologies to be looked up.
INTEGER
top()
An array of the topologies to look up.
Output:
INTEGER
nelem()
An array of the number of elements of each type.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
See example for db_count_elem_w_topology, 272. See also db_count_elem_w_topology (p. 685) in the MSC Acumen Toolkit - Code Example.
  
db_count_nodes_for_geometry
(geoType, geoId, parentType, parentId, nodeCount)
Description:
This function will count all of the nodes associated with the specified piece of geometry. If the parent geometry parameters are specified, then the given child geometry is assumed to be a constituent part of the parent. The parent geometry and ID must define the entity that contains the elements that the requested nodes belong to. For example, if the caller wants all of the nodes on an edge of a solid, the “geoType” and “geoId” should refer to the specific edge and the “parentType” and “parentId” should refer to the solid (assuming that the desired nodes are part of a solid mesh.)
Input:
INTEGER
geoType
The type of the geometry in question (point, curve, etc.)
INTEGER
geoId
The ID of the geometry in question.
INTEGER
parentType
The type of the highest order geometry that the “geoType” is part of.
INTEGER
parentId
The ID of the highest order geometry that the “geoType” is part of.
Output:
INTEGER
nodeCount
The number of nodes associated with that piece of geometry.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
Please see db_count_nodes_for_geometry (p. 689) in the MSC Acumen Toolkit - Code Example.
  
db_get_elems
nelem, mxnode, eid, etop, gtype, gid, econ
Description:
This function will retrieve all of the information about a group of elements from the memory database given the IDs of the elements. The user must pass in the addresses of the output arrays.
Input:
INTEGER
nelem
The number of elements being requested.
INTEGER
mxnode
The maximum number of nodes allowed for each element.
INTEGER
eid (nelem)
An array to element IDs to be looked up.
Output:
INTEGER
etop (nelem)
An array of element topologies.
INTEGER
gtype (nelem)
An array of associated geometry types.
INTEGER
gid (nelem)
An array of associated geometry IDs.
INTEGER
econ (nelem, mxnode)
An array of nude IDs that belong to each element.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Example:
Please see db_get_elems (p. 712) in the MSC Acumen Toolkit - Code Example.
  
db_get_elems_by_lbc
(lbc_id, max_elem, numelem, eid)
Description:
Gets all elements associated with a specified LBC.
Input:
INTEGER
lbc_id
Id of the LBC to which the requested elements are associated.
INTEGER
max_elem
Maximum number of element IDs for which storage has been allocated by the calling routine.
Output:
INTEGER
nelem
Number of elements found associated to the specified LBC.
INTEGER
eid()
Ids of the elements associated to the specified lbc.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000002
Unrecoverable database error.
External Dependencies and Side Effects:
None.
Example:
Please see db_get_elems_by_lbc (p. 713) in the MSC Acumen Toolkit - Code Example.
  
db_get_elem_config_ntl
(atid, acid, geopcd, copcd, fopcd, lopcd, etopid, dofsetid, matlcode, matdcode, config)
Description:
Gets an ntl 25 configuration code from the database.
Input:
INTEGER
atid
The id of the analysis type associated to the selected element type.
INTEGER
acid
The id of the analysis code associated to the selected element type.
INTEGER
geopcd
The id of the geometric option code associated with the selected element type.
INTEGER
copcd
The id of the condense option code associated with the selected element type.
INTEGER
fopcd
The id of the formulation option code associated with the selected element type.
INTEGER
lopcd
The id of the laminate option code associated with the selected element type.
INTEGER
etopid
The id of the element topology associated with the selected element type.
INTEGER
dofsetid
The id of the degree of freedom associated with the selected element type.
INTEGER
matlcode
The id of the material code associated with the selected element type.
INTEGER
matdcode
The id of the material definition code associated with the selected element type.
Output:
INTEGER
config
The id of the associated configuration.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error.
External Dependencies and Side Effects:
Gets a record in the “selected_element_type” table.
Example:
Please see db_get_elem_config_ntl (p. 702) in the MSC Acumen Toolkit - Code Example.
  
db_get_elem_dimens
(top_id, dimen)
Description:
This function will retrieve the element dimensionality for the specified element topology ID value.
Input:
INTEGER
top_id
The element topology ID value.
Output:
INTEGER
dimen
The element dimensionality for the specified ID.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000041
Element not found.
External Dependencies and Side Effects:
None.
Example:
Please see db_get_elem_dimens (p. 704) in the MSC Acumen Toolkit - Code Example.
 
db_get_elem_for_geo_type_and_id
(geo_type, geo_id, nbr_of_elements, element)
  
Description:
This function will retrieve all of the element IDs that have a given geometry type and geometry ID.
Input:
INTEGER
geo_type
The desired geometry type to look for.
INTEGER
geo_id
The desired geometry ID to look for.
INTEGER
nbr_of_elements
The maximum number of elements we can return.
Output:
INTEGER
element (nbr_of_elements)
The array of element IDs with the specified type and ID.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000041
Element not found.
13000093
Too Many Values Returned for Space Allocated.
Example:
Please see db_get_elem_for_geo_type_and_id (p. 705) in the MSC Acumen Toolkit - Code Example.
  
db_get_elem_shape_for_id
(nelem, eid, shape)
 
Description:
This function gets the shape codes for the array of elements specified.
Input:
INTEGER
nelem
The number of elements to be looked up.
INTEGER
eid()
The array of input element IDs.
Output:
INTEGER
shape()
The array of shape codes.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000041
Element not found.
SUCCESS
This function completed successfully.
Example:
Please see db_get_elem_shape_for_id (p. 707) in the MSC Acumen Toolkit - Code Example.
 
db_get_elem_topology_codes
(ntop, top)
  
Description:
The number of element topologies defined in the database.
Input:
INTEGER
ntop
The maximum number of topology IDs that can be returned.
Output:
INTEGER
top()
The array of the element topology IDs.
INTEGER
<Return Value>
Integer indicating the success or failure of the routine.
Example:
Please see db_get_elem_topology_codes (p. 709) in the MSC Acumen Toolkit - Code Example.
  
db_get_elem_topos_for_geom
(geo_id, geo_type, n_tops, top_ids)
Description:
This function will retrieve all of the distinct topology IDs currently in use that match the specified geometry type and geometry ID.
Input:
INTEGER
geo_id
The desired geometry ID to look for.
INTEGER
geo_type
The desired geometry type to look for.
Output:
INTEGER
n_tops
The number of topologies that were found.
INTEGER
top_ids()
The array of topology IDs that were found.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Example:
Please see db_get_elem_topos_for_geom (p. 710) in the MSC Acumen Toolkit - Code Example.
  
db_get_elem_top_name
(id, name)
Description:
This function will retrieve the element topology name for the specified element topology ID value. Note: The output string that will hold the name of the degenerate element topology MUST be at least GrNameLength bytes long. Anything less can cause memory to be overwritten!
Input:
INTEGER
id
The element topology ID value.
Output:
STRING
name[]
The element topology name string.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000091
Analysis type input was not found.
SUCCESS
This function completed successfully.
Example:
Please see db_get_elem_top_name (p. 708) in the MSC Acumen Toolkit - Code Example.
  
db_get_elem_verification_parms
(analysis_code_name, test_id, threshold)
Description:
Gets the element verification parameters.
Input:
STRING
analysis_code_name[31]
The current analysis code name.
INTEGER
test_id
The specific test id.
Output:
REAL
threshold
The threshold value.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000090
Analysis code input was not found.
13000086
No Records Found.
External Dependencies and Side Effects:
This routine accesses records in the analysis_code and element_verification_parms tables in the database.
Example:
Please see db_get_elem_verification_parms (p. 711) in the MSC Acumen Toolkit - Code Example.
  
db_get_etop_for_a_code
(acid, atid, count, etop)
Description:
Retrieves a set of element_topology_ids based of analysis code and type id.
Input:
INTEGER
acid
The analysis code id.
INTEGER
atid
The analysis type id.
INTEGER
count
Maximum number of topologies to be returned.
Output:
INTEGER
etids()
The element type ids retrieved.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000002
Unrecoverable database error.
13000007
An unspecified database error occurred.
External Dependencies and Side Effects:
Retrieves analysis_elements relationships.
Example:
Please see db_get_etop_for_a_code (p. 716) in the MSC Acumen Toolkit - Code Example.
  
db_get_indep_nodes_in_sub_mpc
(mpc_id, sub_mpc_id, mxnode, nnode, nid)
Description:
This function returns a list of independent nodes which refer to the specified sub-MPC.
Input:
INTEGER
mpc_id
This value specifies the mass property constraint or MPC id for which the information is being requested.
INTEGER
sub_mpc_id
This value specifies the sub-mass property constraint or MPC id for which the information is being requested.
INTEGER
mxnode
This value specifies the maximum number of nodes which may be returned for the sub-MPC. This value should be less than or equal to the number of offsets defined for the return value nid.
Output:
INTEGER
nnode
This value returns the number of nodes using the sub-mass property constraint or MPC.
INTEGER
nid()
This value returns the id values of the nodes for each sub-mass property constraint or MPC. The number of offsets allocated for this array should be less than or equal to the input value mxnode.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
13000142
The MPC was not found in the database.
13000143
The sub-MPC was not found in the database.
13000150
The list of nodes for one or more of the MPCs is longer than MAXNODE.
External Dependencies and Side Effects:
Accesses records in the mpc_term_node table in the database.
Example:
Please see db_get_indep_nodes_in_sub_mpc (p. 717) in the MSC Acumen Toolkit - Code Example.