pyHarm.DofGrabber ================= .. py:module:: pyHarm.DofGrabber .. autoapi-nested-parse:: This module gives some functions that allow for grabbing specific dofs from the explicit dof dataFrame built by the system Functions --------- .. autoapisummary:: pyHarm.DofGrabber.sub_grabber pyHarm.DofGrabber.node_grabber pyHarm.DofGrabber.list_node_grabber pyHarm.DofGrabber.dof_grabber pyHarm.DofGrabber.harm_grabber pyHarm.DofGrabber.harm_cs_grabber pyHarm.DofGrabber.gen_NodeToNode_select_matrix pyHarm.DofGrabber._is_connect_type_legacy pyHarm.DofGrabber._transform_legacy pyHarm.DofGrabber._transform_new pyHarm.DofGrabber._transform_input_for_grabber pyHarm.DofGrabber._recursive_union_of_Index Module Contents --------------- .. py:function:: sub_grabber(edf: pandas.DataFrame, sub: str, **kwargs) -> pandas.Index Grab indices from the explicit dof DataFrame based on the substructure. :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param sub: The substructure identifier. :type sub: str :param \*\*kwargs: Additional keyword arguments. :returns: The indices corresponding to the specified substructure. :rtype: pd.Index .. py:function:: node_grabber(edf: pandas.DataFrame, sub: str | None, node: int | None, **kwargs) -> pandas.Index Grab indices from the explicit dof DataFrame based on the substructure and node number. :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param sub: The substructure identifier. :type sub: str | None :param node: The node number. :type node: int | None :param \*\*kwargs: Additional keyword arguments. :returns: The indices corresponding to the specified substructure and node number. :rtype: pd.Index .. py:function:: list_node_grabber(edf: pandas.DataFrame, sub: str | None, node: list[int] | None, **kwargs) -> pandas.Index Grab indices from the explicit dof DataFrame based on the substructure and a list of node numbers. :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param sub: The substructure identifier. :type sub: str | None :param node: The list of node numbers. :type node: list[int] | None :param \*\*kwargs: Additional keyword arguments. :returns: The indices corresponding to the specified substructure and list of node numbers. :rtype: pd.Index .. py:function:: dof_grabber(edf: pandas.DataFrame, sub: str | None, node: int | None, dof: int | None, **kwargs) -> pandas.Index Grab indices from the explicit dof DataFrame based on the substructure, node number, and dof number. :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param sub: The substructure identifier. :type sub: str | None :param node: The node number. :type node: int | None :param dof: The dof number. :type dof: int | None :param \*\*kwargs: Additional keyword arguments. :returns: The indices corresponding to the specified substructure, node number, and dof number. :rtype: pd.Index .. py:function:: harm_grabber(edf: pandas.DataFrame, harm: int | None, **kwargs) -> pandas.Index Grab indices from the explicit dof DataFrame based on the harmonic number. :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param harm: The harmonic number. :type harm: int | None :param \*\*kwargs: Additional keyword arguments. :returns: The indices corresponding to the specified harmonic number. :rtype: pd.Index .. py:function:: harm_cs_grabber(edf: pandas.DataFrame, harm: int | None, cs: str | None, **kwargs) -> pandas.Index Grab indices from the explicit dof DataFrame based on the harmonic number and cosine or sine part. :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param harm: The harmonic number. :type harm: int | None :param cs: either cosine or sine part. :type cs: str | None :param \*\*kwargs: Additional keyword arguments. :returns: The indices corresponding to the specified harmonic number and cosine or sine part. :rtype: pd.Index .. py:function:: gen_NodeToNode_select_matrix(edf: pandas.DataFrame, input_dict: dict, **kwargs) -> tuple[numpy.ndarray, list[numpy.ndarray]] Generate a selection matrix for NodeToNode type of connectors -- Pslave, Pmaster :param edf: The explicit dof DataFrame. :type edf: pd.DataFrame :param input_dict: The input dictionary containing connection information. :type input_dict: dict :param \*\*kwargs: Additional keyword arguments. :returns: indices of the dof conserned from the explicit dof DataFrame. list[np.ndarray]: The selection matrix for NodeToNode transformation. :rtype: np.ndarray .. py:function:: _is_connect_type_legacy(_connect: dict[str, list] | list[tuple[str, list[int]]]) -> bool .. py:function:: _transform_legacy(_connect: dict[str, list]) -> list[dict[str, int]] .. py:function:: _transform_new(_connect: list[tuple[str, list[int]]]) -> list[dict[str, int]] .. py:function:: _transform_input_for_grabber(input_dict: dict) -> list[dict[str, int]] .. py:function:: _recursive_union_of_Index(LI: list[pandas.Index])