Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDoyle2 committed Dec 31, 2018
1 parent 823c97a commit 519998a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pyNastran/converters/nastran/nastran_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -6974,7 +6974,8 @@ def _fill_op2_output(self, op2_filename, cases, model, form, icase):
icase = self._fill_op2_oug_oqg(cases, model, key, icase,
disp_dict, header_dict, keys_map)

icase = self._fill_grid_point_forces(cases, model, key, icase, disp_dict)
icase = self._fill_grid_point_forces(cases, model, key, icase,
disp_dict, header_dict, keys_map)
ncases = icase - ncases_old
#print('ncases=%s icase=%s' % (ncases, icase))
#assert ncases > 0, ncases
Expand Down
17 changes: 13 additions & 4 deletions pyNastran/converters/nastran/results_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ def __init__(self):
super(NastranGuiResults, self).__init__()


def _fill_grid_point_forces(self, cases, model, key, icase, form_dict):
def _fill_grid_point_forces(self, cases, model, key, icase,
form_dict, header_dict, keys_map):
if key not in model.grid_point_forces:
print('return icase...')
return icase
grid_point_forces = model.grid_point_forces[key]
if not grid_point_forces.is_real:
raise RuntimeError(grid_point_forces.is_real)
#return icase
case = grid_point_forces
if not case.is_real:
#raise RuntimeError(grid_point_forces.is_real)
return icase

subcase_id = key[0]
title = 'GridPointForces'
Expand All @@ -48,6 +50,13 @@ def _fill_grid_point_forces(self, cases, model, key, icase, form_dict):
cases[icase] = (nastran_res, (itime, 'GridPointForces')) # do I keep this???
formii = ('GridPointForces', icase, [])
form_dict[(key, itime)].append(formii)

dt = case._times[itime]
header = _get_nastran_header(case, dt, itime)
header_dict[(key, itime)] = header
keys_map[key] = (case.subtitle, case.label,
case.superelement_adaptivity_index, case.pval_step)

icase += 1
return icase

Expand Down
2 changes: 1 addition & 1 deletion pyNastran/converters/panair/panair_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _fill_panair_geometry_case(self, cases, ID, nodes, elements, regions,
return form, cases, nids, eids

def load_panair_results(self, panair_filename):
model_name = name
model_name = 'main'
#colormap = self.colormap
colormap = 'jet'
cases = self.gui.result_cases
Expand Down

0 comments on commit 519998a

Please sign in to comment.