pyLBM.elements.
Sphere
(center, radius, label=0, isfluid=False)¶Class Sphere
Parameters: | center : a list that contains the three coordinates of the center radius : a positive float for the radius label : list of one integer (default [0]) isfluid : boolean
|
---|
Examples
the sphere centered in (0, 0, 0) with radius 1
>>> center = [0., 0., 0.]
>>> radius = 1.
>>> Sphere(center, radius)
Sphere([0 0 0],1) (solid)
Attributes
number_of_bounds | (int) 1 |
center | (numpy array) the coordinates of the center of the sphere |
radius | (double) positive float for the radius of the sphere |
label | (list of integers) the list of the label of the edge |
isfluid | (boolean) True if the sphere is added and False if the sphere is deleted |
Methods
get_bounds () |
Get the bounds of the sphere. |
point_inside (grid) |
return a boolean array which defines |
distance (grid, v[, dmax]) |
Compute the distance in the v direction between the sphere and the points defined by (x, y, z). |