LineElement#

class planestress.analysis.finite_elements.lines.LineElement(line_idx: int, line_tag: int, coords: ndarray[Any, dtype[float64]], node_idxs: list[int], num_nodes: int, int_points: int)[source]#

Bases: object

Abstract base class for a line element.

Methods

element_load_vector

Assembles the load vector for the line element.

shape_functions_jacobian

Evaluates the shape functions and jacobian of the element.

__init__(line_idx: int, line_tag: int, coords: ndarray[Any, dtype[float64]], node_idxs: list[int], num_nodes: int, int_points: int) None[source]#

Inits the LineElement class.

Parameters:
  • line_idx (int) – Line element index.

  • line_tag (int) – Mesh line element tag.

  • coords (ndarray[Any, dtype[float64]]) – A numpy.ndarray of coordinates defining the element, e.g. [[x1, x2], [y1, y2]].

  • node_idxs (list[int]) – List of node indexes defining the element, e.g. [idx1, idx2].

  • num_nodes (int) – Number of nodes in the line element.

  • int_points (int) – Number of integration points used for the finite element.

static shape_functions_jacobian(iso_coord: float, coords: tuple[float, ...]) tuple[npt.NDArray[np.float64], float][source]#

Evaluates the shape functions and jacobian of the element.

Parameters:
  • iso_coord (float) – Location of the point in isoparametric coordinates.

  • coords (tuple[float, ...]) – Flattened coordinates array.

Raises:

NotImplementedError – If this method hasn’t been implemented for an element.

Return type:

tuple[npt.NDArray[np.float64], float]

element_load_vector(direction: str, value: float) ndarray[Any, dtype[float64]][source]#

Assembles the load vector for the line element.

Parameters:
  • direction (str) – Direction of the line load, "x", "y" or "xy".

  • value (float) – Value of the line load.

Returns:

Line element load vector.

Return type:

ndarray[Any, dtype[float64]]