8.7.1 Connectivity class: A class for handling element/node connectivity.

A connectivity object is a 2-dimensional integer array with all non-negative values. In this implementation, all values should be lower than 2**31.

Furthermore, all values in a row should be unique. This is not enforced at creation time, but a method is provided to check the uniqueness.

The Connectivity class has this constructor:

class Connectivity( data,dtyp=None,copy=False)
Create a new Connectivity object.

data should be integer type and evaluate to an 2-dim array. If copy==True, the data are copied. If no dtype is given, that of data are used, or int32 by default.

Connectivity objects have the following methods:

nelems( )

nplex( )

Max( )

unique( )
Return a list of arrays with the unique values for each row.

checkUnique( )
Flag the rows which have all unique entries.

Returns an array with the value True or Falsefor each row.

check( )
Returns True if all rows have unique entries.

reverseIndex( )
Return a reverse index for the connectivity table.

This is equivalent to the function reverseIndex()

expand( )
Transform elems to edges and faces.

Return a tuple edges,faces where - edges is an (nedges,2) int array of edges connecting two node numbers. - faces is an (nelems,nplex) int array with the edge numbers connecting each pair os subsequent nodes in the elements of elems.

The order of the edges respects the node order, and starts with nodes 0-1. The node numbering in the edges is always lowest node number first.

The inverse operation can be obtained from function compactElems.