From a66fdbaff5de904411552b30efc6e7db16571173 Mon Sep 17 00:00:00 2001 From: "Kenneth T. Moore" Date: Mon, 31 Jul 2023 12:32:40 -0400 Subject: [PATCH] Fix for using phase timeseries report in mpi --- .../timeseries/bokeh_timeseries_report.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dymos/visualization/timeseries/bokeh_timeseries_report.py b/dymos/visualization/timeseries/bokeh_timeseries_report.py index 175f2b6ca..ccbcb683a 100644 --- a/dymos/visualization/timeseries/bokeh_timeseries_report.py +++ b/dymos/visualization/timeseries/bokeh_timeseries_report.py @@ -150,8 +150,7 @@ def _load_data_sources(prob, solution_record_file=None, simulation_record_file=N 'sim_data_by_phase': {}, 'timeseries_units': {}} - for phase in traj.system_iter(include_self=True, recurse=True, typ=dm.Phase): - phase_name = phase.pathname.split('.')[-1] + for phase_name, phase in traj._phases.items(): data_dict[traj_name]['param_data_by_phase'][phase_name] = {'param': [], 'val': [], 'units': []} phase_sol_data = data_dict[traj_name]['sol_data_by_phase'][phase_name] = {} @@ -191,8 +190,7 @@ def _load_data_sources(prob, solution_record_file=None, simulation_record_file=N # Now a second pass through the phases since we know the units in which to plot # each timeseries variable output. - for phase in traj.system_iter(include_self=True, recurse=True, typ=dm.Phase): - phase_name = phase.pathname.split('.')[-1] + for phase_name, phase in traj._phases.items(): phase_sol_data = data_dict[traj_name]['sol_data_by_phase'][phase_name] = {} phase_sim_data = data_dict[traj_name]['sim_data_by_phase'][phase_name] = {} @@ -262,8 +260,8 @@ def make_timeseries_report(prob, solution_record_file=None, simulation_record_fi param_tables = [] phase_names = [] - for phase in traj.system_iter(include_self=True, recurse=True, typ=dm.Phase): - phase_name = phase.pathname.split('.')[-1] + for phase_name, phase in traj._phases.items(): + phase_names.append(phase_name) # Make the parameter table