Skip to content
Snippets Groups Projects
Commit cfdc28d4 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Vectorized '_calculate_wavelet_coeffs()' for wavelet detectors.

parent 4370bddd
Branches
No related tags found
No related merge requests found
...@@ -237,13 +237,8 @@ class WaveletDetector(TroubledCellDetector): ...@@ -237,13 +237,8 @@ class WaveletDetector(TroubledCellDetector):
Matrix of multiwavelet coefficients. Matrix of multiwavelet coefficients.
""" """
output_matrix = [] return 0.5 * (self._wavelet_projection_left.T @ projection[:, 1:-1] +
for i in range(self._mesh.num_cells): self._wavelet_projection_right.T @ projection[:, 2:])
new_entry = 0.5*(
projection[:, i+1] @ self._wavelet_projection_left
+ projection[:, i+2] @ self._wavelet_projection_right)
output_matrix.append(new_entry)
return np.transpose(np.array(output_matrix))
def _select_degree(self, wavelet_matrix): def _select_degree(self, wavelet_matrix):
"""Select degree of wavelet coefficients for troubled cell detection. """Select degree of wavelet coefficients for troubled cell detection.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment