udfGetElmCnn()

Return the element connectivity.

Syntax

elemCnn = udfGetElmCnn( udfHd ) ;

Type

User Defined Element

Parameters

udfHd
The opaque handle (pointer) which was passed to the user function.

Return Value

elemCnn (Integer*)
Pointer to two dimensional integer array of element connectivity. The first (fastest) dimension of the array is the number of elements in the element set, nItems, and the second (slower) dimension is the number of element nodes, nElemNodes.

Description

This routine returns the array of element connectivity. This is the array, without the first column, of the parameter elements of the command ELEMENT_SET in the input file. For example,
Integer* elemCnn ;
Integer elemNode, elem, node, nElemNodes ;
...
nElemNodes = udfGetElmNElemNodes( udfHd ) ;
elemCnn = udfGetElmCnn( udfHd ) ;
for ( elem = 0 ; elem < nItems ; elem++ ) {
  for ( elemNode = 0 ; elemNode < nElemNodes ; elemNode++ ) {
    node = elemCnn[elemNode*nItems+elem] ;
    ...
   }
}

Errors

  • This routine expects a valid udfHd.
  • This routine may only be called within a Body Force, Material Model or Component Model user function.