Commit a79a34c2 authored by Domanski, Marian M.'s avatar Domanski, Marian M.

set last time step to include total time

parent acf2f8ad
......@@ -17,11 +17,11 @@ class SimulationClock:
def __init__(self, time_step_size, total_simulation_time):
if total_simulation_time % time_step_size == 0:
time_array = np.arange(0, total_simulation_time + time_step_size,
time_step_size, dtype=float)
n_steps = total_simulation_time // time_step_size
else:
time_array = np.arange(0, total_simulation_time, time_step_size,
dtype=float)
n_steps = total_simulation_time // time_step_size + 1
time_array = time_step_size*np.arange(0, n_steps+1, dtype=float)
self._time_array = time_array
self._current_time_index = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment