Skip to content

Commit

Permalink
Fix for MPI so that all phases show up in the phase timeseries plot. (#…
Browse files Browse the repository at this point in the history
…959)

* Fix for openmdao warning messages.

* Fix for using phase timeseries report in mpi

* PEP
  • Loading branch information
Kenneth-T-Moore authored Aug 7, 2023
1 parent c7382c9 commit 2a717ec
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dymos/visualization/timeseries/bokeh_timeseries_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {}
Expand Down Expand Up @@ -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] = {}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2a717ec

Please sign in to comment.