LineBoundaryCondition#

class planestress.pre.boundary_condition.LineBoundaryCondition(point1: tuple[float, float], point2: tuple[float, float], direction: str, value: float)[source]#

Bases: BoundaryCondition

Abstract base class for a boundary condition along a line.

Variables:

mesh_tag – Tagged line object.

Methods

apply_bc

Applies the boundary condition.

get_unique_nodes

Returns a list of unique node indexes along the line BC.

__init__(point1: tuple[float, float], point2: tuple[float, float], direction: str, value: float) None[source]#

Inits the LineBoundaryCondition class.

Parameters:
  • point1 (tuple[float, float]) – Point location (x, y) of the start of the line.

  • point2 (tuple[float, float]) – Point location (x, y) of the end of the line.

  • direction (str) – Direction of the boundary condition, "x" or "y".

  • value (float) – Value of the boundary condition.

get_unique_nodes() list[int][source]#

Returns a list of unique node indexes along the line BC.

Returns:

List of unique node indexes along the line.

Return type:

list[int]

apply_bc(k: ndarray[Any, dtype[float64]], f: ndarray[Any, dtype[float64]]) tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]]#

Applies the boundary condition.

Parameters:
Raises:

NotImplementedError – If this method has not been implemented.

Return type:

tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]]