NODE_ID_CLOSEST

Returns an integer node ID associated with the node of a flexible body closest to a marker. If you set intpt to 1, NODE_ID_CLOSEST considers only the interface nodes.

Format

inode_id_closest (marker, flex_body, intpt)

Arguments

 
marker
Name of the marker object.
flex_body
Name of the flexible body object.
intpt
Integer flag:
1 - Consider only interface nodes.
0 - Consider all nodes.

Returns

If NODE_ID_CLOSEST finds no node, it returns a integer value of zero (0) with no warning.

Example

The figure on the next page shows a flexible body, link, with two interface points at nodes 10000 and 20000. There is also a marker on ground, marker_1. The example below finds the interface node on link that is closest to marker_1 and assigns its node number to the integer variable .int_node.
var set var=.int_node int=(eval(node_id_closest(marker_1, link, 1)))