pyLBM.elements.Parallelepiped

class pyLBM.elements.Parallelepiped(point, v0, v1, v2, label=0, isfluid=False)

Class Parallelepiped

Parameters:

point : a list that contains the three coordinates of the first point

v0 : a list of the three coordinates of the first vector that defines the edge

v1 : a list of the three coordinates of the second vector that defines the edge

v2 : a list of the three coordinates of the third vector that defines the edge

label : list of three integers (default [0,0,0] for the bottom, the top and the side)

isfluid : boolean

  • True if the cylinder is added
  • False if the cylinder is deleted

Examples

the vertical canonical cube centered in (0, 0, 0)

>>> center = [0., 0., 0.5]
>>> v0, v1, v2 = [1., 0., 0.], [0., 1., 0.], [0., 0., 1.]
>>> Parallelepiped(center, v0, v1, v2)
    Parallelepiped([0 0 0], [1 0 0], [0 1 0], [0 0 1]) (solid)

Attributes

number_of_bounds (int) 6
point (numpy array) the coordinates of the first point of the parallelepiped
v0 (list of doubles) the three coordinates of the first vector
v1 (list of doubles) the three coordinates of the second vector
v2 (list of doubles) the three coordinates of the third vector
label (list of integers) the list of the label of the edge
isfluid (boolean) True if the parallelepiped is added and False if the parallelepiped is deleted

Methods

get_bounds : return the bounds of the parallelepiped
point_inside : return True or False if the points are in or out the parallelepiped
distance : get the distance of a point to the parallelepiped