8.1.3 Basic access methods

__getitem__( i)
This is equivalent to self.f.__getitem__(i). It allows to access the data in the coordinate array f of the Formex with all the index methods of numpy. The result is an float array or a single float. Thus: F[1] returns the second element of F, F[1,0] the first point of that element and F[1,0,2] the z-coordinate of that point. F[:,1] is an array with the second point of all elements. F[:,:,1] is the y-coordinate of all points of all elements in the Formex.

__setitem__( i,val)
This is equivalent to self.f.__getitem__(i). It allows to change individual elements, points or coordinates using the item selection syntax. Thus: F[1:5,1,2] = 1.0 sets the z-coordinate of the second points of the elements 1, 2, 3 and 4 to the value 1.0.

element( i)
Returns the element i. F.element[i] is currently equivalent with F[i].

point( i,j)
Returns the point j of the element i. F.point[i,j] is equivalent with F[i,j].

coord( i,j,k)
Returns the coordinate k of the point j of the element i. F.coord[i,j,k] is equivalent with F[i,j,k].