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

Fixed bug in calculation of 'max_avg'.

parent 44390bc2
Branches
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
@author: Laura C. Kühle, Soraya Terrab (sorayaterrab)
TODO: Fix cell averages and reconstructions to create data with an x-point stencil
TODO: Fix bug for max_avg calculation -> Done
"""
import os
......@@ -437,7 +438,7 @@ class Theoretical(WaveletDetector):
def _get_cells(self, multiwavelet_coeffs, projection):
troubled_cells = []
max_avg = max(1, max(abs(projection[0][degree]) for degree in range(self._polynomial_degree+1)))
max_avg = np.sqrt(0.5) * max(1, max(abs(projection[0][cell+1]) for cell in range(self._num_coarse_grid_cells)))
for cell in range(self._num_coarse_grid_cells):
if self._is_troubled_cell(multiwavelet_coeffs, cell, max_avg):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment