NodeBoundaryCondition#
- class planestress.pre.boundary_condition.NodeBoundaryCondition(point: tuple[float, float], direction: str, value: float, priority: int)[source]#
Bases:
BoundaryCondition
Abstract base class for a boundary condition at a node.
- Variables:
mesh_tag – Tagged node object.
Methods
Applies the boundary condition.
Gets the degrees of freedom based on the BC direction.
Get the degrees of freedom of the node.
- __init__(point: tuple[float, float], direction: str, value: float, priority: int) None [source]#
Inits the NodeBoundaryCondition class.
- Parameters:
- get_node_dofs() list[int] [source]#
Get the degrees of freedom of the node.
- Raises:
RuntimeError – If a mesh tag has not been assigned.
- Returns:
List (length 2) of degrees of freedom.
- Return type:
- apply_bc(k: lil_array, f: npt.NDArray[np.float64]) tuple[lil_array, npt.NDArray[np.float64]] #
Applies the boundary condition.
- Parameters:
k (lil_array) – Stiffness matrix.
f (npt.NDArray[np.float64]) – Load vector.
- Raises:
NotImplementedError – If this method has not been implemented.
- Return type:
tuple[lil_array, npt.NDArray[np.float64]]