pyHarm.Predictors.PredictorPreviousSolution¶
Classes¶
Defines the previous solution type of predictor. Uses the previous solution for the displacement and puts the step purely on the angular frequency. |
Module Contents¶
- class pyHarm.Predictors.PredictorPreviousSolution.PredictorPreviousSolution(sign_ds, logger: logging.Logger | None = None, **kwargs)¶
Bases:
pyHarm.Predictors.ABCPredictor.ABCPredictorDefines the previous solution type of predictor. Uses the previous solution for the displacement and puts the step purely on the angular frequency.
- factory_keyword: str = 'previous'¶
keyword that is used to call the creation of this class in the system factory.
- Type:
str
- predictor_name = 'Previous Solution Predictor'¶
- predict(sollist: list[pyHarm.Solver.SystemSolution], ds: float, k_imposed=None) tuple[numpy.ndarray, pyHarm.Solver.SystemSolution, float]¶
Predicts the next starting point by taking the previous solution and making a step in angular frequency.
- 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