pylbm.elements.
Sphere
(center, radius, label=0, isfluid=False)¶Class Sphere
the three coordinates of the center
a positive real number for the radius
one integer (default [0])
True if the sphere is added
False if the sphere is deleted
Examples
the sphere centered in (0, 0, 0) with radius 1
>>> center = [0., 0., 0.]
>>> radius = 1.
>>> Sphere(center, radius)
+--------+
| Sphere |
+--------+
- dimension: 3
- center: [0. 0. 0.]
- radius: 1.0
- label: [0]
- type: solid
1
3
the coordinates of the center of the sphere
a positive real number for the radius of the sphere
the list of the label of the edge
True if the sphere is added and False if the sphere is deleted
Methods
|
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. |
|
visualize the element |