pyHarm.Predictors.PredictorSecant ================================= .. py:module:: pyHarm.Predictors.PredictorSecant Classes ------- .. autoapisummary:: pyHarm.Predictors.PredictorSecant.PredictorSecant Module Contents --------------- .. py:class:: PredictorSecant(sign_ds, logger: Optional[logging.Logger] = None, **kwargs) Bases: :py:obj:`pyHarm.Predictors.PredictorTangent.PredictorTangent` Define the Secant predictor. From the last two solution points, generates the adequate direction. When only one solution point is available, makes use of the tangent predictor. .. py:attribute:: predictor_name :value: 'Secant Predictor' keyword that is used to call the creation of this class in the system factory. :type: str .. py:attribute:: factory_keyword :type: str :value: 'secant' keyword that is used to call the creation of this class in the system factory. :type: str .. py:method:: predict_usingtan(sollist: list, ds: float, k_imposed=None) -> tuple[numpy.ndarray, pyHarm.Solver.SystemSolution, float] Predicts the next starting point using the tangent. :param sollist: list of SystemSolution already solved during the analysis. :type sollist: list[SystemSolution] :param ds: step size for the prediction. :type ds: float :param k_imposed: if not None, uses the k_imposed as the index of the last solution pointer. :type k_imposed: None | int :returns: next predicted starting point. SystemSolution: last accepted point in the list of solutions. float: sign of the prediction used (-1 | 1) :rtype: np.ndarray .. py:method:: predict(sollist: list, ds: float, k_imposed=None) -> tuple[numpy.ndarray, pyHarm.Solver.SystemSolution, float] Predicts the next starting point using secant prediction. :param sollist: list of SystemSolution already solved during the analysis. :type sollist: list[SystemSolution] :param ds: step size for the prediction. :type ds: float :param k_imposed: if not None, uses the k_imposed as the index of the last solution pointer. :type k_imposed: None | int :returns: next predicted starting point. SystemSolution: last accepted point in the list of solutions. float: sign of the prediction used (-1 | 1) :rtype: np.ndarray