From b19c79a85af2ee5b798743805b52b39da833f189 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: Fri, 31 Mar 2023 18:13:43 +0200
Subject: [PATCH] Added annotations to questions to Burgers.

---
 Snakefile               | 20 ++++++++++++--------
 scripts/tcd/Equation.py |  6 ++++++
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Snakefile b/Snakefile
index ff61b17..98234a3 100644
--- a/Snakefile
+++ b/Snakefile
@@ -22,19 +22,23 @@ TODO: Contemplate using lambdify for basis
 TODO: Contemplate allowing vector input for ICs
 TODO: Discuss how wavelet details should be plotted
 
-TODO: Ask whether we are dealing with inviscid Burgers only
-TODO: Ask why we limit the initial time step
-TODO: Ask whether cfl number should be absolute value
-TODO: Ask why cells 1 and -2 are adjusted for Dirichlet boundary
+TODO: Ask whether we are dealing with inviscid Burgers only -> Done (yes)
+TODO: Ask why we limit the initial time step -> Done (to prevent
+    irregularities related to instability in later steps)
+TODO: Ask whether cfl number should be absolute value -> Done (by definition)
+TODO: Ask why cells 1 and -2 are adjusted for Dirichlet boundary -> Done (
+    not sure, try with ghost cells only for now)
 TODO: Ask why height adjustment and stretch factor are considered outside of
-    implicit solver function
+    implicit solver function -> Done (can be in solver)
 TODO: Ask about workings of implicit solver for Burgers
-TODO: Ask whether Burgers has compatible ICs other than Sine and
-    DiscontinuousConstant
+    -> Done (look into file burgex.f)
+TODO: Ask whether Burgers has compatible ICs other than Sine (shock case) and
+    DiscontinuousConstant (rarefaction) -> Done (yes, but irrelevant for now)
+TODO: Ask about fluxes other than Lax Friedrich -> Done (not needed now)
 
 Urgent:
 TODO: Add Burgers class completely
-TODO: Enabale choice of equation
+TODO: Enable choice of equation
 TODO: Add subclasses of Burgers
 TODO: Ignore ghost domains by flagging all cells with it for extreme outlier
 TODO: Add functions to create each object from dict
diff --git a/scripts/tcd/Equation.py b/scripts/tcd/Equation.py
index c91f798..9f97e14 100644
--- a/scripts/tcd/Equation.py
+++ b/scripts/tcd/Equation.py
@@ -522,6 +522,7 @@ class Burgers(Equation):
         Code adapted from DG code by Hesthaven.
 
         """
+        # Shock speed = 1/2*(left+right values)
         sspeed = self._init_cond._height_adjustment
         uexact = np.zeros(np.size(grid_values))
 
@@ -529,10 +530,15 @@ class Burgers(Equation):
         xx = np.linspace(0, 1, 200)
         uu = np.sin(self._init_cond._factor * np.pi * xx)
 
+        # Scale time for domain
         te = self._final_time * (2 / mesh.interval_len)
+
+        # Initial characteristic guess (where is the solution)
         xt0 = (2 / mesh.interval_len) * (
                     grid_values-sspeed * self._final_time).reshape(
             np.size(grid_values))
+
+        # Check whether in interval
         for ix in range(len(xt0)):
             if xt0[ix] > 1:
                 xt0[ix] -= 2 * np.floor(0.5 * (xt0[ix]+1))
-- 
GitLab