GeMA
The GeMA main application
Node set object methods

Node set objects are used to store a set of mesh nodes. Their main use is to represent nodes in mesh borders, serving as application points for boundary conditions. Node set objects can be obtained in the orchestration from a mesh object by calling the mesh:nodeSets() method.

Example:

-- Get the node set object named 'set_name' from the mesh
local nodeSetMap = m:nodeSets()
local ns = nodeSetMap['set_name']

Index:

Node set metadata methods

nodeSet:id()
Description: Returns the node set id.
Parameters: None.
Returns: Returns a string with the node set name.

Example:

-- Print node set object name
print(nodeSet:id())


nodeSet:mesh()
Description: Returns the mesh object owning the nodes included in this node set.
Parameters: None.
Returns: Returns the associated mesh object.

Example:

local mesh = nodeSet:mesh()


Node set query methods

nodeSet:numNodes()
Description: Returns the number of nodes in this node set.
Parameters: None.
Returns: Returns the number of nodes in this node set.

Example:

local nnodes = nodeSet:numNodes()


nodeSet:node(index)
Description: Returns the mesh node number given its index inside the node set. If the returned node is a ghost node, it will have its high bit set.
Parameters: index - The node set index (a value between 1 and nodeSet:numNodes()).
Returns: Returns the mesh node number.

Example:

local node = nodeSet:node(1) -- Returns the first mesh node in this node set


Node set updating methods

nodeSet:setNodeData(nodes)
Description: Replaces the complete set of nodes of a node set object by the given ones.
Parameters: nodes - A table with the mesh index of the new nodes in the node set. Ghost nodes should have their high bit set.
Returns: Nothing.

Example:

-- Updates the node set with the following nodes: {2, 4, 6, 8}
local newNodes = {2, 4, 6, 8}
nodeSet:setNodeData(newNodes)