Skip to content

Commit 4c623e9

Browse files
committed
plot and save the last time step in simulation
1 parent b93e542 commit 4c623e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pylbm_ui/widgets/simulation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@ async def run_simu(self):
292292
await asyncio.sleep(0)
293293
if self.start.v_model:
294294
break
295+
296+
# save and plot the last time step
297+
if nite > 1:
298+
self.simu.save_data(self.result.v_model)
299+
self.simu.plot(self.plot, self.result.v_model)
300+
self.plot_output.children[0].draw_idle()
301+
302+
# stop the simulation
295303
self.stop_simulation(None)
296304

297305
def start_simulation(self, widget, event, data):

0 commit comments

Comments
 (0)