Tutorial Toolkit Function Descriptions > Finite Element Model > MPCs
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
MPCs
  
db_get_next_mpc_id
( next_id )
Description:
Return the next available unused MPC id.
Input:
None.
Output:
INTEGER
next_id
The MPC 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:
13000004
Duplicate entry exists in table.
External Dependencies and Side Effects:
Accesses records in the mpc table in the database.
Example:
Please see db_get_next_mpc_id (p. 727) in the MSC Acumen Toolkit - Code Example.
  
fem_get_mpc_assoc_nodes
( nmpc, idmpcs, nnodes, ids )
Description:
Get a list of all the nodes associated with the MPCs in the FEM_LIST.
Input:
INTEGER
nmpc
Number of MPCs.
INTEGER
idmpcs(nmpc)
List of MPCs.
Output:
INTEGER
nnodes
Number of unique nodes associated with MPCs.
INTEGER
ids()symbol
Pointer to VIRTUAL integer array containing list of associated Node IDs.
INTEGER
<Return Value>
0 Function was successful.
-1 Abort
-2 No MPCs in list
-3 No associated nodes
Error Conditions:
2001070
Unable to acquire %I% words of virtual memory.
4
Interrupted system call.
Example:
Please see fem_get_mpc_assoc_nodes (p. 751) in the MSC Acumen Toolkit - Code Example.
 
fem_get_mpc_ids
( entity_list, nmpc, idmpc, notfound, idnoexist )
  
Description:
This function will extract an array of MPC id values from a picklist string.
Input:
STRING
entity_list[]
This value specifies a list of mass property constraints or MPCs.
Output:
 
 
INTEGER
nmpc
This value returns the number of offsets defined for the return value idmpc.
INTEGER
idmpc(VIRTUAL)
This value returns the sorted mass property constraint or MPC id values.
INTEGER
notfound
This value returns the number of offsets defined for the return value idnoexist.
INTEGER
idnoexist(VIRTUAL)
This value returns the sorted id values for mass property constraints or MPCs that do not exist.
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:
-1
Abort.
-2
No existing MPCs in list.
4
Interrupted system call.
2001070
Unable to acquire %I% words of virtual memory.
Example:
Please see fem_get_mpc_ids (p. 753) in the MSC Acumen Toolkit - Code Example.
 
db_count_valid_dofs_f_mpc_type
( mpc_type_id, num_dofs )
 
Description:
Gets a count of the valid degrees of freedom for a particular MPC types from the database.
Input:
INTEGER
mpc_type_id
The MPC type id
Output:
INTEGER
inum_dofs
The number of valid DOFS for this MPC type id.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
External Dependencies and Side Effects:
Accesses records in the mpc_term_dof table in the database.
Example:
Please see db_count_valid_dofs_f_mpc_type (p. 694) in the MSC Acumen Toolkit - Code Example.
 
db_validate_mpc
( mpc_id, valid_flag )
  
Description:
This function determines if an MPC is valid.
Input:
INTEGER
mpc_id
This value specifies the MPC identifier.
Output:
LOGICAL
valid_flag
This value returns the status of the MPC. If this value is set to 1 ( TRUE ), then the MPC is value. If this value is set to 0 ( FALSE ) then the MPC is invalid.
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.
External Dependencies and Side Effects:
Accesses records in the mpc, valid_mpc_type, control_info and analysis_code tables in the database.
Remarks:
An MPC is valid if its type and associated degrees of freedom are valid for the current analysis code and analysis type preferences.
Example:
Please see db_validate_mpc (p. 743) in the MSC Acumen Toolkit - Code Example.
  
db_count_valid_mpc_types
( numtypes )
Description:
Gets a count of the valid MPC type for the default analysis type id and analysis code id from the database.
Input:
None.
Output:
INTEGER
numtypes
The number of valid MPC type ids.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
External Dependencies and Side Effects:
Accesses records in the valid_mpc_type table in the database.
Example:
Please see db_count_valid_mpc_types (p. 695) in the MSC Acumen Toolkit - Code Example.
 
db_get_all_valid_dof_f_mpc_type
( mpc_type_id )
  
Description:
Get all the valid degrees of freedom for a particular MPC type from the database.
Input:
INTEGER
mpc_type_id
The MPC type id.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Example:
See example for db_count_valid_dofs_f_mpc_type, 284. See also db_get_all_valid_dof_f_mpc_type (p. 696) in the MSC Acumen Toolkit - Code Example.
 
db_get_nxt_valid_dof_f_mpc_type
( mpc_type_id, dof_id, dof_name )
 
Description:
Get the next valid degree of freedom for a particular MPC type from the database.
Input:
INTEGER
mpc_type_id
The MPC type id.
Output:
INTEGER
dof_id
The degree of freedom id.
STRING
dof_name[]
The degree of freedom name.
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:
13000142
The MPC was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_type, mpc and mpc_term_dof tables in the database.
Example:
See example for db_count_valid_dofs_f_mpc_type, 284. See also db_get_nxt_valid_dof_f_mpc_type (p. 736) in the MSC Acumen Toolkit - Code Example.
  
db_get_all_valid_mpc_type
( )
 
Description:
Get the next valid (for the current analysis code and analysis type) MPC type id and name stored in the database.
Input:
None.
Output:
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:
13000142
The MPC was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_type, mpc and mpc_term_dof tables in the database.
Example:
See example for db_count_valid_mpc_types, 285. See also db_get_all_valid_mpc_type (p. 697) in the MSC Acumen Toolkit - Code Example.
  
db_get_next_valid_mpc_type
( mpc_type_id, mpc_type_name )
Description:
Get the next valid (for the current analysis code and analysis type) MPC type id and name stored in the database.
Input:
None.
Output:
INTEGER
mpc_type_id
The MPC type id.
STRING
mpc_type_name[]
The MPC type name.
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:
13000142
The MPC was not found in the database.
External Dependencies and Side Effects:
Accesses records in the valid_mpc_type and mpc_type table in the database.
Example:
See example for db_count_valid_mpc_types, 285. See also db_get_next_valid_mpc_type (p. 729) in the MSC Acumen Toolkit - Code Example.
  
db_get_dep_nodes_in_sub_mpc
( mpc_id, sub_mpc_id, mxnode, nnode, nid )
Description:
This function returns a list of dependent 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_dep_nodes_in_sub_mpc (p. 698) in the MSC Acumen Toolkit - Code Example.
  
db_get_dof_id
( dof_name, dof_id )
Description:
Get the degree of freedom id from its degree of freedom name.
Input:
STRING
dof_name[]
The degree of freedom name.
Output:
INTEGER
dof_id
The degree of freedom 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:
13000140
The DOF ID was not found in the database
External Dependencies and Side Effects:
Accesses records in the degrees_of_freedom table in the database.
Example:
Please seedb_get_dof_id (p. 700) in the MSC Acumen Toolkit - Code Example.
 
db_get_dof_name
( dof_id, dof_name )
  
Description:
Get the degree of freedom name from its degree of freedom id.
Input:
INTEGER
dof_id
The degree of freedom id.
Output:
INTEGER
dof_name
The degree of freedom name.
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:
13000140
The DOF ID was not found in the database
External Dependencies and Side Effects:
Accesses records in the degrees_of_freedom table in the database.
Example:
Please see db_get_dof_name (p. 701) in the MSC Acumen Toolkit - Code Example.
  
db_get_mpc_type_id
( mpc_type_name, mpc_type_id )
Description:
Get the MPC type id from its MPC type name.
Input:
STRING
mpc_type_name[]
The MPC type name.
Output:
INTEGER
mpc_type_id
The MPC type 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:
13000152
The MPC type ID was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_type table in the database.
Example:
Please see db_get_mpc_type_id (p. 724) in the MSC Acumen Toolkit - Code Example.
  
db_get_mpc_type_name
( mpc_type_id, mpc_type_name )
Description:
Get the MPC type name from its MPC type id.
Input:
INTEGER
mpc_type_id
The MPC type id.
Output:
STRING
mpc_type_name[]
The MPC type 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:
13000152
The MPC type ID was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_type table in the database.
Example:
Please see db_get_mpc_type_name (p. 725) in the MSC Acumen Toolkit - Code Example.
  
db_get_valid_mpc_ids_in_group
( gid, nmpc, numval, mpcid )
Description:
Returns a list of ids for all valid MPCs in a group. A MPC is valid if it’s type and associated degrees of freedom are valid for the current analysis code and analysis type preferences.
Input:
INTEGER
gid
The group id.
INTEGER
nmpc
The number of valid MPCs to be returned.
Output:
INTEGER
numval
The actual number of valid MPCs.
INTEGER
mpcid()
The MPC ids.
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:
13000008
Group not found.
13000156
There are more than NMPC valid MPCs in the database.
External Dependencies and Side Effects:
Accesses records in the mpc, valid_mpc_type, control_info and analysis_code tables in the database.
Example:
Please see db_get_valid_mpc_ids_in_group (p. 739) in the MSC Acumen Toolkit - Code Example.
  
fem_get_mpc_assoc_groups
( nmpc, idmpcs, ngroups, assoc_group_ids )
Description:
Get a list of all the groups associated with the MPCs in the FEM_LIST.
Input:
INTEGER
nmpc
Number of MPCs.
INTEGER
idmpcs
List of MPCs.
Output:
INTEGER
ngroups()
Number of unique groups associated with MPCs.
INTEGER
assoc_group_ids
Pointer to VIRTUAL integer array containing list of associated group IDs.
INTEGER
<Return Value>
0 Function was successful.
-1 Abort.
-2 No MPCs in list.
-3 No associated groups.
Example:
Please see fem_get_mpc_assoc_groups (p. 750) in the MSC Acumen Toolkit - Code Example.