pyHarm.Predictors.ABCPredictor ============================== .. py:module:: pyHarm.Predictors.ABCPredictor Classes ------- .. autoapisummary:: pyHarm.Predictors.ABCPredictor.ABCPredictor Module Contents --------------- .. py:class:: ABCPredictor(sign_ds, **kwargs) Bases: :py:obj:`abc.ABC` Abstract class for the predictor: Any added predictor shall be constructed from this class. :param sign_ds: if -1 predict in the direction of decreasing angular frequency, if 1 the opposite direction :type sign_ds: float .. attribute:: flag_print information are printed during the analysis if True. :type: bool .. attribute:: predictor_options dictionary containing the kwargs and competed using the default options if the keywords are missing. :type: dict .. py:property:: factory_keyword :type: str :abstractmethod: Returns: str: keyword that is used to call the creation of this class in the system factory. .. py:attribute:: default_options set of default parameters for the system class if not given in the input argument. It contains a normalisation parameter using the keyword 'norm' that can be set to either 'norm1' (default) if the direction is normed to 1 or 'om' if the direction is normed to 1 only for the angular frequency. It contains a bifurcation detection using the 'bifurcation_detect' keyword that can be set to True (default) if detection is needed. It contains a 'verbose' keyword that can be set to True (default) if information about detection of bifurcations is to be displayed during solving. :type: dict .. py:attribute:: sign_ds_init .. py:attribute:: sign_ds .. py:attribute:: predictor_options .. py:attribute:: flag_print .. py:method:: predict(sollist: list[pyHarm.Solver.SystemSolution], ds: float) -> tuple[numpy.ndarray, pyHarm.Solver.SystemSolution, float] :abstractmethod: Predicts the next strating point. :param sollist: list of SystemSolution already solved during the analysis. :type sollist: list[SystemSolution] :param ds: step size for the prediction. :type ds: float .. py:method:: bifurcation_detect(lstpt: pyHarm.Solver.SystemSolution) Makes a bifurcation detection analysis computing determinant of jacobian matrix and analysing change of sign. :param lstpt: previously accepted point in direct link with the actual solved point. :type lstpt: SystemSolution .. attribute:: sign_ds Attribute is modified if a turning point is detected. :type: float .. py:method:: getPointerToSolution(sollist: list[pyHarm.Solver.SystemSolution], k_imposed=None) -> pyHarm.Solver.SystemSolution Gets the last accepted solution in direct link with the studied point. :param sollist: list of SystemSolution already solved during the analysis. :type sollist: list[SystemSolution] :param k_imposed: if not None then the provided index is used as the last accepted point. :type k_imposed: None|int :returns: last accepted point. :rtype: SystemSolution .. py:method:: norm_dir(dir: float) -> float Normalises the direction according to the choice of norm given in the class attributes. :param dir: prediction direction. :type dir: np.ndarray :returns: normalized prediction direction. :rtype: np.ndarray