8.1.7 Methods returning copies

copy( )
Return a deep copy of itself.

__add__( other)
Return a Formex with all elements of self and other. This allows the user to write simple expressions as F+G to concatenate the Formices F and G. As with the append() method, both Formices should have the same plexitude.

concatenate( Flist)
Return the concatenation of all formices in Flist. All formices should have the same plexitude. This is a class method, not an instance method.

select( idx)
Return a Formex which holds only elements with numbers in idx. idx can be a single element number or a list of numbers.

selectNodes( idx)
Return a Formex which holds only some nodes of the parent. idx is a list of node numbers to select.
Thus, if F is a grade 3 Formex representing triangles, the sides of the triangles are given by
F.selectNodes([0,1]) + F.selectNodes([1,2]) + F.selectNodes([2,0])
The returned Formex inherits the property of its parent.

points( )
Return a Formex containing only the points.

This is obviously a Formex with plexitude 1. It holds the same data as the original Formex, but in another shape: the number of points per element is 1, and the number of elements is equal to the total number of points. The properties are not copied over, since they will usually not make any sense.

remove( F)
Return a Formex where the elements in F have been removed.

This is also the subtraction of the current Formex with F. Elements are only removed if they have the same nodes in the same order. This is a slow operation: for large structures, you should avoid it where possible.

withProp( val)
Return a Formex which holds only the elements with property val.

val is either a single integer, or a list/array of integers. The return value is a Formex holding all the elements that have the property val, resp. one of the values in val. The returned Formex inherits the matching properties.

If the Formex has no properties, a copy with all elements is returned.

elbbox( )
Return a Formex where each element is replaced by its bbox.

The returned Formex has two points for each element: two corners of the bbox.

unique( self,rtol=1.e-4,atol=1.e-6)
Return a Formex which holds only the unique elements.

Two elements are considered equal when all its nodal coordinates are close. Two values are close if they are both small compared to atol or their difference divided by the second value is small compared to rtol. Two elements are not considered equal if one's elements are a permutation of the other's.

Warning: this operation is slow when performed on large Formices. Its use is decouraged.

reverseElements( )
Return a Formex where all elements have been reversed.

Reversing an element means reversing the order of its points.