@lru_cache(maxsize=1)
def triangles(self) -> npt.NDArray[int]:
    "Retrieves an array of tria element node indices\n\n        Parameters\n        ----------\n\n        Returns\n        -------\n        npt.NDArray\n            2D array of element nodes for triangle nodes\n\n        Notes\n        -----\n        The result of this method is cached, so that multiple calls\n        to it won't result in multiple calculations. If the mesh\n        is modified and the cache is not properly clear the calls\n        to this method can result in invalid return values.\n        "
    return np.array([list(map(self.mesh.nodes.get_index_by_id, element)) for element in self().values() if (len(element) == 3)])
Retrieves an array of tria element node indices

Parameters
----------

Returns
-------
npt.NDArray
    2D array of element nodes for triangle nodes

Notes
-----
The result of this method is cached, so that multiple calls
to it won't result in multiple calculations. If the mesh
is modified and the cache is not properly clear the calls
to this method can result in invalid return values.
@lru_cache(maxsize=1)
def triangles(self) -> npt.NDArray[int]:
    "Retrieves an array of tria element node indices\n\n        Parameters\n        ----------\n\n        Returns\n        -------\n        npt.NDArray\n            2D array of element nodes for triangle nodes\n\n        Notes\n        -----\n        The result of this method is cached, so that multiple calls\n        to it won't result in multiple calculations. If the mesh\n        is modified and the cache is not properly clear the calls\n        to this method can result in invalid return values.\n        "
    return np.array([list(map(self.mesh.nodes.get_index_by_id, element)) for element in self().values() if (len(element) == 3)])