pylbm.elements.Circle

class pylbm.elements.Circle(center, radius, label=0, isfluid=False)

Class Circle

Parameters
  • center (a list that contains the two coordinates of the center) –

  • radius (a positive float for the radius) –

  • label (list of one integer (default [0])) –

  • isfluid (boolean) –

    • True if the circle is added

    • False if the circle is deleted

number_of_bounds

1

Type

int

center

the coordinates of the center of the circle

Type

numpy array

radius

positive float for the radius of the circle

Type

double

label

the list of the label of the edge

Type

list of integers

isfluid

True if the circle is added and False if the circle is deleted

Type

boolean

Examples

the circle centered in (0, 0) with radius 1

>>> center = [0., 0.]
>>> radius = 1.
>>> Circle(center, radius)
    Circle([0 0],1) (solid)
__init__(center, radius, label=0, isfluid=False)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(center, radius[, label, isfluid])

Initialize self.

distance(grid, v[, dmax])

Compute the distance in the v direction between the circle and the points defined by (x, y).

get_bounds()

Get the bounds of the circle.

point_inside(grid)

return a boolean array which defines if a point is inside or outside of the circle.

test_label()

test if the number of labels is equal to the number of bounds.