*rbe3updatewts

Updates the weights for the specified independent node indices and the dependent node for an RBE3 element. This command requires node indices (usually 0-3) as input, not node IDs.

Syntax

*rbe3updatewts element changed_nodes nodesize changed_weights weightsize dweight

Type

HyperMesh Tcl Modify

Description

Updates the weights for the specified independent node indices and the dependent node for an RBE3 element. This command requires node indices (usually 0-3) as input, not node IDs.

Inputs

element
The ID of the RBE3 element to update.
changed_nodes
The ID of an array containing the independent node indices of an RBE3 element whose weights are to be updated.
nodesize
The size of the changed_nodes array
changed_weights
The ID of an array containing the weights for the respective independent node indices specified in the changed_nodes array.
weightsize
The size of the changed_weights array.
dweight
The weight assigned for the dependent node of the RBE3 element.

Example

The following lines update the weights of independent nodes 100, 101, and 102 to 1.5 and the weight of dependent node to 1.0 for an RBE3 element with ID 18.

First, determine the indices of the independent nodes in the rbe3 element:

set inodes [ hm_entityinfo "inode" ELEMENTS 18 ];
set num_nodes [ llength $inodes ];
set node_idx_to_update "";
set i 0;
while { $i < $num_nodes }  {
set node_id [ lindex $inodes $i ]; 
switch -- $node_id {
100 { set idx_100 $i; }
101 { set idx_101 $i; }
102 { set idx_102 $i; } 
}
    incr i;
}
Now update the weights:
*createarray(3) $idx_100 $idx_101 $idx_102
*createdoublearray(3) 1.5 1.5 1.5
*rbe3updatewts(18,1,3,1,3,1.0)
A *createarray() and *createdoublearray() command are required to define the pairing of independent node index and new weight for that node.
Note: This is designed to work efficiently from within a process automation script (Tcl).

Errors

None.