pyHarm.Predictors.PredictorSecant¶
Classes¶
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. |
Module Contents¶
- class pyHarm.Predictors.PredictorSecant.PredictorSecant(sign_ds, **kwargs)¶
Bases:
pyHarm.Predictors.PredictorTangent.PredictorTangentDefine 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.
- predictor_name = 'Secant Predictor'¶
keyword that is used to call the creation of this class in the system factory.
- Type:
str
- factory_keyword: str = 'secant'¶
keyword that is used to call the creation of this class in the system factory.
- Type:
str
- predict_usingtan(sollist: list, ds: float, k_imposed=None) tuple[numpy.ndarray, pyHarm.Solver.SystemSolution, float]¶
Predicts the next starting point using the tangent.
- Parameters:
sollist (list[SystemSolution]) – list of SystemSolution already solved during the analysis.
ds (float) – step size for the prediction.
k_imposed (None | int) – if not None, uses the k_imposed as the index of the last solution pointer.
- Returns:
next predicted starting point. SystemSolution: last accepted point in the list of solutions. float: sign of the prediction used (-1 | 1)
- Return type:
np.ndarray
- predict(sollist: list, ds: float, k_imposed=None) tuple[numpy.ndarray, pyHarm.Solver.SystemSolution, float]¶
Predicts the next starting point using secant prediction.
- Parameters:
sollist (list[SystemSolution]) – list of SystemSolution already solved during the analysis.
ds (float) – step size for the prediction.
k_imposed (None | int) – if not None, uses the k_imposed as the index of the last solution pointer.
- Returns:
next predicted starting point. SystemSolution: last accepted point in the list of solutions. float: sign of the prediction used (-1 | 1)
- Return type:
np.ndarray