Element

class LRSplines.Element(u_min: float, v_min: float, u_max: float, v_max: float, level: int = 0)[source]
add_supported_b_spline(b_spline)[source]

Adds a B-spline to the list of supported B-splines.

Parameters:b_spline – B-spline to add
area

Returns the area of the element.

Returns:area of the element
contains(u: float, v: float) → bool[source]

Returns True if this element contains the point (u, v)

Parameters:
  • u – u_component
  • v – v_component
Returns:

evaluate_basis(u, v)[source]

Evaluates all the supported B-splines at the point u, v :param u: :param v: :return:

fetch_neighbours()[source]

Returns a list of neighbouring elements based on supported B-splines.

Returns:
get_supported_b_spline(i: int)[source]

Returns the i-th supported B-spline.

Parameters:i – index of supported B-spline
Returns:b-spline i
has_supported_b_spline(b_spline) → bool[source]

Returns True if given b_spline is among the list of supported b-splines.

Parameters:b_spline – B-spline to check
Returns:True or False
intersects(other: LRSplines.element.Element) → bool[source]

Returns true if this element intersects the other element with positive area.

Parameters:other – the element to check intersection with.
Returns:true or false
is_overloaded() → bool[source]

Returns true if the number of supported B-splines on this element is greater than (d1 + 1)*(d2 + 1).

Returns:true if overloaded, false otherwise
midpoint

Returns the midpoint of the element.

Returns:midpoint of the element
remove_supported_b_spline(b_spline)[source]

Removes a B-spline from the list of supported B-splines.

Parameters:b_spline – B-spline to remove
split(axis: int, split_value: float) → LRSplines.element.Element[source]

Splits the element into two, resizing into the left half, and returning the right half.

Returns:right half of element.
update_supported_basis(b_splines: List[LRSplines.b_spline.BSpline]) → None[source]

Updates the list of supported basis functions.

Parameters:b_splines – list of BSpline functions