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

Fixed bug in calculation of 'cfl_number' in last time step.

parent 1f484860
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ TODO: Double-check everything!
TODO: Replace loops with list comprehension if feasible
TODO: Write documentation for all methods
TODO: Contemplate how to make shock tubes comparable
TODO: Fix bug in approximation -> Done (used num_grid_cells instead of cell_len for cfl_number in last step)
"""
import numpy as np
......@@ -103,7 +104,7 @@ class DGScheme(object):
cfl_number = self._cfl_number
if current_time+time_step > self._final_time:
time_step = self._final_time-current_time
cfl_number = self._wave_speed * time_step / self._num_grid_cells
cfl_number = self._wave_speed * time_step / self._cell_len
# Update projection
projection, troubled_cells = self._update_scheme.step(projection, cfl_number)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment