Time Transition Provider (time_transition_provider)¶
- class pypint.multi_level_providers.level_transition_providers.time_transition_provider.TimeTransitionProvider(*args, **kwargs)[source]¶
-
Level Transition Provider between two time levels
Provides prolongation and restringation between two time levels based on interpolation.
In case of nested notes (i.e. fine level with 5 Gauss-Lobatto nodes, coarse level with 3 Gauss-Lobatto nodes) the restringation is a simple injection.
Prolongation is always done via plain interpolation.
- _scaled_interpolation_weights(from_points, to_points, index)[source]¶
non-proofen custom integration method
This computes the integration weights based on their relative distance. The distance contributes squared to weaken nodes further away in contrast to nodes close by.
For two given sets of nodes \(\vec{x}^C \in \mathbb{R}^n\) and \(\vec{x}^F \in \mathbb{R}^N\) with \(n < N\) the interpolation weights for the interpolation from \(\vec{x}^C\) onto \(\vec{x}^F\) at a target node \(x^F \in \vec{x}^F\):
\[\tilde{\omega}_i = \left( 1 - \frac{|x^F - x_i^C|}{|x_0 - x_N|} \right) ^ 2\]To counter unwanted scaling effects, the computed weights are scaled to sum up to \(1\):
\[\vec{\omega} = \frac{\tilde{\omega}}{\sum_{i=1}^n \tilde{\omega}_i}\]Parameters: - from_points (numpy.ndarray of \(n\) float) – nodes to interpolate from; the Lagrange polynome is based on these
- to_points (numpy.ndarray of \(N\) float) – nodes to interpolate onto; the Lagrange polynome is evaluated at one of these
- index (float) – index of the target node to evaluate the Lagrange polynome at
Returns: value – interpolation weight for given nodes
Return type: float
Notes
Please be aware, that this method has not been mathematically or numerically tested and validated.