helpers.ParaDiagHelper module¶
- get_E_matrix(N, alpha=0)[source]¶
Get NxN matrix with -1 on the lower subdiagonal, -alpha in the top right and 0 elsewhere
- Parameters:
N (int) – Size of the matrix
alpha (float) – Negative of value in the top right
- Returns:
sparse E matrix
- get_FFT_matrix(N)[source]¶
Get matrix for computing FFT of size N. Normalization is like “ortho” in numpy. Compute inverse FFT by multiplying by the complex conjugate (numpy.conjugate) of this matrix
- Parameters:
N (int) – Size of the data to be transformed
- Returns:
Dense square matrix to compute forward transform
- Return type:
numpy.ndarray
- get_H_matrix(N, sweeper_params)[source]¶
Get sparse matrix for computing the collocation update. Requires not to do a collocation update!
- Parameters:
N (int) – Number of collocation nodes
sweeper_params (dict) – Parameters for the sweeper
- Returns:
Sparse matrix for collocation update
- get_J_inv_matrix(N, alpha)[source]¶
Get matrix for weights in the weighted FFT
- Parameters:
N (int) – Size of the matrix
alpha (float) – alpha parameter in ParaDiag
- Returns:
sparse J_inv matrix
- get_J_matrix(N, alpha)[source]¶
Get matrix for weights in the weighted inverse FFT
- Parameters:
N (int) – Size of the matrix
alpha (float) – alpha parameter in ParaDiag
- Returns:
sparse J matrix