Contents     Functions         Previous Next     PDF Index

7.11  Node selection

feutil FindNode supports a number of node selection criteria that are used by many functions. A node selection command is specified by giving a string command (for example 'GroupAll', or the equivalent cell array representation described at the end of this section) to be applied on a model (nodes, elements, possibly alternate element set).

Output arguments are the numbers NodeId of the selected nodes and the selected nodes node as a second optional output argument. The basic commands are

Accepted selectors are

 
GID iselects the nodes in the node group i (specified in column 4 of the node matrix). Logical operators are accepted.
Group iselects the nodes linked to elements of group(s) i in the main model. Same as InElt{Group i}
Groupa iselects nodes linked to elements of group(s) i of the alternate model
InElt{sel}selects nodes linked to elements of the main model that are selected by the element selection command sel.
NodeId >iselects nodes selects nodes based relation of NodeId to integer i. The logical operator >, <, >=, <=, ~=, or == can be omitted (the default is then ==).
 feutil('findnode 1 2',model) interprets the values as NodeId unless three values are given (then intrepreted as x y z). feutil('findnode',model,IdList) should then be used.
NotIn{sel}selects nodes not linked to elements of the main model that are selected by the element selection command sel.
Plane == i nx ny nzselects nodes on the plane containing the node number i and orthogonal to the vector [nx ny nz]. Logical operators apply to the oriented half plane. i can be replaced by string o xo yo zo specifying the origin.
rad <=r x y zselects nodes based on position relative to the sphere specified by radius r and position x y z node or number x (if y and z are not given). The logical operator >, <, >=, <= or == can be omitted (the default is then <=).
cyl <=r i nx ny nz z1 z2selects nodes based on position relative to the cylinder specified by radius r and axis of direction nx ny nz and origin the node i (NodeId i can be replaced by string o xo yo zo). Optional arguments z1 and z2 define bottom and top boundaries from origin along cylinder axis.
Setname namefinds nodes based on a set defined in the model stack. Note that the name must not contain blanks or be given between double quotes "name". Set can be a NodeId or even an EltId or FaceId, EdgeId set. "name:con IdList" can be used to select a subset connected to nodes in the IdList.
x>aselects nodes such that their x coordinate is larger than a. x y z r (where the radius r is taken in the xy plane) and the logical operators >, <, >=, <=, == can be used.
 Expressions involving other dimensions can be used for the right hand side. For example r>.01*z+10.
x y zselects nodes with the given position. If a component is set to NaN it is ignored. Thus [0 NaN NaN] is the same as x==0.

Element selectors EGID, EltId, EltName, MatId and ProId are interpreted as InElt selections.

Command option epsl value can be used to give an evaluation tolerance for equality logical operators.

Different selectors can be chained using the logical operations & (finds nodes that verify both conditions), | (finds nodes that verify one or both conditions). Condition combinations are always evaluated from left to right (parentheses are not accepted).

While the string format is typically more convenient for the user, the reference format for a node selection is really a 4 column cell array :

{SelectorOperatorData
LogicalSelectorOperatorData
}   

The first column gives the chaining between different rows, with Logical being either &, | or a bracket ( and ). The Selector is one of the accepted commands for node selection (or element selection if within a bracket). The operator is a logical operator >, <, >=, <=, ~=, or ==. The data contains numerical or string values that are used to evaluate the operator. Note that the meaning of ~= and == operators is slightly different from base MATLAB operators as they are meant to operate on sets.

The feutil FindNodeStack command returns the associated cell array rather than the resulting selection.


©1991-2012 by SDTools
Previous Up Next