From ac49fe3bbe7e80e8ad3667a6fa2dfdabbcd0750e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=BChle=2C=20Laura=20Christine=20=28lakue103=29?=
 <laura.kuehle@uni-duesseldorf.de>
Date: Mon, 19 Sep 2022 00:17:52 +0200
Subject: [PATCH] Fixed indexing issue in wavelet coefficient calculation.

---
 Troubled_Cell_Detector.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Troubled_Cell_Detector.py b/Troubled_Cell_Detector.py
index af30a1f..24e7ec1 100644
--- a/Troubled_Cell_Detector.py
+++ b/Troubled_Cell_Detector.py
@@ -240,8 +240,8 @@ class WaveletDetector(TroubledCellDetector):
         output_matrix = []
         for i in range(self._mesh.num_grid_cells):
             new_entry = 0.5*(
-                    projection[:, i] @ self._wavelet_projection_left
-                    + projection[:, i+1] @ self._wavelet_projection_right)
+                    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))
 
-- 
GitLab