implementations.convergence_controller_classes.estimate_polynomial_error module¶
- class EstimatePolynomialError(controller, params, description, **kwargs)[source]¶
Bases:
ConvergenceController
Estimate the local error by using all but one collocation node in a polynomial interpolation to that node. While the converged collocation problem with M nodes gives a order M approximation to this point, the interpolation gives only an order M-1 approximation. Hence, we have two solutions with different order, and we know their order. That is to say this gives an error estimate that is order M. Keep in mind that the collocation problem should be converged for this and has order up to 2M. Still, the lower order method can be used for time step selection, for instance. If the last node is not the end point, we can interpolate to that node, which is an order M approximation and compare to the order 2M approximation we get from the extrapolation step. By default, we interpolate to the second to last node.
- check_parameters(controller, params, description, **kwargs)[source]¶
Check if we allow the scheme to solve the collocation problems to convergence.
- Parameters:
controller (pySDC.Controller) – The controller
params (dict) – The params passed for this specific convergence controller
description (dict) – The description object used to instantiate the controller
- Returns:
Whether the parameters are compatible str: The error message
- Return type:
bool
- matmul(A, b)[source]¶
Matrix vector multiplication, possibly MPI parallel. The parallel implementation performs a reduce operation in every row of the matrix. While communicating the entire vector once could reduce the number of communications, this way we never need to store the entire vector on any specific rank.
- Parameters:
A (2d np.ndarray) – Matrix
b (list) – Vector
- Returns:
Axb
- Return type:
List
- post_iteration_processing(controller, S, **kwargs)[source]¶
Estimate the error
- Parameters:
controller (pySDC.Controller.controller) – The controller
S (pySDC.Step.step) – The current step
- Returns:
None
- reset_status_variables(controller, **kwargs)[source]¶
Add variable for embedded error
- Parameters:
controller (pySDC.Controller) – The controller
- Returns:
None
- setup(controller, params, description, **kwargs)[source]¶
- Parameters:
controller (pySDC.Controller.controller) – The controller
params (dict) – The params passed for this specific convergence controller
description (dict) – The description object used to instantiate the controller
- Returns:
The updated params dictionary
- Return type:
(dict)