From 15458d0bc2287cc353f9d905508b78a197207e62 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, 12 May 2023 10:34:52 +0200 Subject: [PATCH] Moved 'height_adjustment' and 'stretch_factor' into 'implicit_burgers_solver().' --- Snakefile | 3 ++- scripts/tcd/Equation.py | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Snakefile b/Snakefile index 4960e3c..e91491f 100644 --- a/Snakefile +++ b/Snakefile @@ -26,7 +26,8 @@ Urgent: TODO: Mark Burgers' equation as inviscid -> Done TODO: Make sure CFL number is absolute value -> Done TODO: Make sure only ghost cells are limited for Dirichlet boundary -> Done -TODO: Move height adjustment and stretch factor into implicit solver function +TODO: Move height adjustment and stretch factor into implicit solver + function -> Done TODO: Check correctness of implicit solver (with burgex.f) TODO: Add Burgers class completely TODO: Enable choice of equation diff --git a/scripts/tcd/Equation.py b/scripts/tcd/Equation.py index 569a4e4..a00670e 100644 --- a/scripts/tcd/Equation.py +++ b/scripts/tcd/Equation.py @@ -483,9 +483,7 @@ class Burgers(Equation): if self._init_cond.__name__ == 'Sine': # u(x,t) = u(x - u0*time, 0) - exact = self._init_cond._height_adjustment + \ - self._init_cond._stretch_factor * \ - self.implicit_burgers_solver(grid, mesh) + exact = self.implicit_burgers_solver(grid, mesh) elif self._init_cond.__name__ == 'DiscontinuousConstant': # u(x,t) = u(x - u0*time, 0) exact = self.rarefaction_wave(grid) @@ -577,7 +575,8 @@ class Burgers(Equation): burgers_exact = uexact.reshape((1, np.size(grid_values))) - return burgers_exact + return self._init_cond._height_adjustment + \ + self._init_cond._stretch_factor * burgers_exact @enforce_boundary() def update_right_hand_side(self, projection: ndarray) -> ndarray: -- GitLab