Scheme¶
- class simframe.integration.Scheme(scheme, controller={}, description='')[source]¶
Bases:
object
Class for an integration
Scheme
that can be used as template for creating custom schemes.Notes
The integration
Scheme
needs to returnFalse
if the integration failed. TheIntegrator
will then perform a fail operation and will try it again. This can be used to implement schemes with adaptive step sizes. If the step size was not small enough the fail operation can reduce it further.- Attributes
controller
Dictionary with keyword arguments that is passed to the integration
Scheme
.description
Description of the
Scheme
.scheme
Integration
Scheme
.
Methods
__call__
(x0, Y0, dx, *args, **kwargs)Method for returning the new value of the variable to be integrated.
Attributes Summary
Dictionary with keyword arguments that is passed to the integration
Scheme
.Description of the
Scheme
.Integration
Scheme
.Methods Summary
__call__
(x0, Y0, dx, *args, **kwargs)Method for returning the new value of the variable to be integrated.
Attributes Documentation
- controller¶
Dictionary with keyword arguments that is passed to the integration
Scheme
.
- description¶
Description of the
Scheme
.
- scheme¶
Integration
Scheme
.
Methods Documentation
- __call__(x0, Y0, dx, *args, **kwargs)[source]¶
Method for returning the new value of the variable to be integrated.
- Parameters
x0 (Intvar) – Integration variable at beginning of scheme
Y0 (Field) – Variable to be integrated at the beginning of scheme
dx (IntVar) – Stepsize of integration variable
controller (dict, optional, default : {}) – Additional keyword arguments passed to integration scheme
args (additional positional arguments) –
kwargs (additional kewyowrd arguments) –
- Returns
Y1 – New value of the variable to be integrated. Functions needs to return
False
if integration failed.- Return type
Field or False