pyHarm.BaseUtilFuncs ==================== .. py:module:: pyHarm.BaseUtilFuncs .. autoapi-nested-parse:: This file contains a set of general useful functions that are in use in most of pyHarm modules. .. attribute:: Dico_ABCClass_factory_keyword Dictionary linking the abstract classes defined in every available subpackages and their factory dictionary. :type: dict Attributes ---------- .. autoapisummary:: pyHarm.BaseUtilFuncs.Dico_ABCClass_factory_keyword pyHarm.BaseUtilFuncs._plugable_types Functions --------- .. autoapisummary:: pyHarm.BaseUtilFuncs.getCustomOptionDictionary pyHarm.BaseUtilFuncs.getIndexfromExpldofs pyHarm.BaseUtilFuncs.pyHarm_plugin Module Contents --------------- .. py:function:: getCustomOptionDictionary(custom_options: dict, default_options: dict) Given a custom option dictionary and a default option dictionary, returns a new dictionary containing all the custom information along with the missing mandatory ones from the default dictionary. :param custom_options: A dictionary containing custom options. :type custom_options: dict :param default_options: A dictionary containing default options. :type default_options: dict :returns: A new dictionary combining the custom options with the default options. :rtype: dict .. py:function:: getIndexfromExpldofs(expl_dofs: pandas.DataFrame, list_of_caracteristics: list[tuple[str, int, list[int]]]) Uses an explicit dof vector and returns an array of indices corresponding to the required dofs. Takes a list of tuples [(substructure_name[str], node_number[int], dir_num[list[int]]), ...]. If None is given as input for the directions, then all the dofs from the node are returned. :param expl_dofs: A DataFrame representing the explicit representation of the degree of freedom vector. :type expl_dofs: pd.DataFrame :param list_of_caracteristics: A list of tuples specifying the substructure name, node number, and direction numbers. :type list_of_caracteristics: list[tuple[str,int,list[int]]] :returns: An array of indices corresponding to the required dofs, sorted in ascending order. :rtype: np.ndarray .. py:data:: Dico_ABCClass_factory_keyword Dictionary linking the abstract classes defined in every available subpackages and their factory dictionary. :type: dict .. py:data:: _plugable_types .. py:function:: pyHarm_plugin(cls: _plugable_types) Plugin function for the pyHarm module. Allows registering a class in the pyHarm factories. :param cls: A class to be registered in one of the pyHarm factories.