pylbm.elements.
Sphere
(center, radius, label=0, isfluid=False)¶Class Sphere
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) –
True if the sphere is added
False if the sphere is deleted
number_of_bounds
¶1
int
center
¶the coordinates of the center of the sphere
numpy array
radius
¶positive float for the radius of the sphere
double
label
¶the list of the label of the edge
list of integers
isfluid
¶True if the sphere is added and False if the sphere is deleted
boolean
number_of_bounds
number of edges (1)
int
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)
__init__
(center, radius, label=0, isfluid=False)¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |
|
Compute the distance in the v direction between the sphere and the points defined by (x, y, z). |
|
Get the bounds of the sphere. |
|
return a boolean array which defines if a point is inside or outside of the sphere. |
|
test if the number of labels is equal to the number of bounds. |