Level Transition Provider Interface (i_level_transition_provider)¶
- class pypint.multi_level_providers.level_transition_providers.i_level_transition_provider.ILevelTransitionProvider(*args, **kwargs)[source]¶
Bases: builtins.object
Interface for level transition providers.
- __init__(*args, **kwargs)[source]¶
Parameters: - num_fine_points (int) – (optional) Number of points of the fine level.
- num_coarse_points (int) – (optional) Number of points of the coarse level.
- prolongate(coarse_data)[source]¶
Prolongates given data from the coarse to the fine level.
Parameters: coarse_data (numpy.ndarray) – Coarse data vector to prolongate.
Returns: prolongated data – Prolongated data on the fine level.
Return type: numpy.ndarray
Raises: ValueError –
- if coarse_data is not a numpy.ndarray
- if coarse_data has more or less entries than num_coarse_points
- restringate(fine_data)[source]¶
Restringates given data from the fine to the coarse level.
Parameters: fine_data (numpy.ndarray) – Fine data vector to restringate.
Returns: restringated data – Restringated data on the coarse level.
Return type: numpy.ndarray
Raises: ValueError –
- if fine_data is not a :py:class:`numpy.ndarray
- if fine_data has more or less entries than num_fine_points
- __weakref__¶
list of weak references to the object (if defined)
- num_coarse_points[source]¶
Accessor for the number of points of the coarse level.
The number of coarse points equals \(\frac{n_{fine}+1}{2}\).
Returns: number of coarse points – Number of points on the fine level. Return type: int
- num_fine_points[source]¶
Accessor for the number of points of the fine level.
Returns: number of fine points – Number of points on the fine level. Return type: int