nodes='all',dir=0,min=None,max=None) |
This function is very convenient in clipping a Formex in one of the coordinate directions. It returns a 1D integer array flagging (with a value 1 or True) the elements having points with coordinates in the specified range. Use where(result) to get a list of element numbers passing the test. Or directly use the clip() or cclip() methods to create the clipped Formex.
The test plane can be defined in two ways, depending on the value of dir. If dir is a single integer (0, 1 or 2), it specifies a global axis and min and max are the minimum and maximum values for the coordinates along that axis. Default is the 0 (or x) direction. Else, dir should be compatible with a (3,) shaped array and specifies the direction of the normal on the planes. In this case, min and max are points and should also evaluate to (3,) shaped arrays.
xmin,xmax are there minimum and maximum values required for the coordinates in direction dir (default is the x or 0 direction).
nodes specifies which points are taken into account in the comparisons. It should be one of the following:
If you want to have a list of the element numbers that satisfy the specified conditions, you can use numpy's where function on the result. Thus where(F.where(min=1.0)) returns a list with all elements lying right of the plane x=1.0.
t) |
t should be a 1-D integer array with length equal to the number of elements of the formex. The resulting Formex will contain all elements where t > 0. This is a convenience function for the user, equivalent to F.select(t>0).
t) |