diff --git a/Snakefile b/Snakefile index 4960e3ca761e5235fd58fc851c41b22905acfde4..e91491fd49c59216591d4b230bdc810524fde3b0 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 569a4e4a6405cda3da32ab56cb394721717a2711..a00670e05836fbd3e3937ea77978684e86ebdb18 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: