pyHarm.StepSizeRules.StepSizeAcceptance¶
Classes¶
Step size is divided by 2 if last solution is not accepted or multiplied by 2 if a number of consecutive accepted solutions is reached. |
Module Contents¶
- class pyHarm.StepSizeRules.StepSizeAcceptance.StepSizeAcceptance(bounds: list[float, float], **kwargs)¶
Bases:
pyHarm.StepSizeRules.ABCStepSizeRule.ABCStepSizeRuleStep size is divided by 2 if last solution is not accepted or multiplied by 2 if a number of consecutive accepted solutions is reached.
- default_options¶
contains default step size options concerning consecutive_accept if not provided during creation.
- Type:
dict
- consecutive_accept¶
number of consecutive accept before increasing step size.
- Type:
int
- name = 'accepted step size adaptation'¶
- factory_keyword: str = 'acceptance'¶
Returns: str: keyword that is used to call the creation of this class in the system factory.
- default_options¶
- stepsize_options¶
- consecutive_accept¶
- getStepSize(ds: float, sollist: list[pyHarm.Solver.SystemSolution], **kwargs) float¶
Returns the step size to be used for the prediction step of the analysis.
- Parameters:
ds (float) – Current step size.
sollist (list[SystemSolution]) – list of SystemSolution returned during the analysis.
- Returns:
updated step size.
- Return type:
float