pyLBM.elements.
Ellipse
(center, v1, v2, label=0, isfluid=False)¶Class Ellipse
Parameters: | center : a list that contains the two coordinates of the center v1 : a vector v2 : a second vector (v1 and v2 have to be othogonal) label : list of one integer (default [0]) isfluid : boolean
|
---|
Examples
the ellipse centered in (0, 0) with v1=[2,0], v2=[0,1]
>>> center = [0., 0.]
>>> v1 = [2., 0.]
>>> v2 = [0., 1.]
>>> Ellipse(center, v1, v2)
Ellipse([0 0], [2 0], [0 1]) (solid)
Attributes
number_of_bounds | (int) 1 |
center | (numpy array) the coordinates of the center of the ellipse |
v1 | (numpy array) the coordinates of the first vector |
v2 | (numpy array) the coordinates of the second vector |
label | (list of integers) the list of the label of the edge |
isfluid | (boolean) True if the ellipse is added and False if the ellipse is deleted |
number_of_bounds | (int) number of edges (1) |
Methods
distance (grid, v[, dmax]) |
Compute the distance in the v direction between the ellipse and the points defined by (x, y). |
get_bounds () |
Get the bounds of the ellipse. |
point_inside (grid) |
return a boolean array which defines |
test_label () |
test if the number of labels is equal to the number of bounds. |