Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDoyle2 committed Dec 4, 2024
1 parent bcd2da8 commit da4b064
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions pyNastran/f06/flutter_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
class FlutterResponse:
"""storage object for single subcase SOL 145 results"""

def __eq__(self, flutter_response: FlutterResponse) -> bool:
return True
def export_to_hdf5(self, h5_file, encoding: str):
return #h5_file.create_dataset('data', data=np.ones(10))

def __repr__(self) -> str:
#from pyNastran.utils import object_stats
#print(object_stats(self))
Expand Down
7 changes: 5 additions & 2 deletions pyNastran/op2/op2.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ def _is_op2_case_equal(self, table_type: str,
return True

# does this ever hit?
if not any(word in aname for word in ['Array', 'Eigenvalues', 'GridPointWeight', 'TRMBU', 'TRMBD']):
skip_names = [
'Array', 'Eigenvalues', 'GridPointWeight', 'TRMBU', 'TRMBD',
'FlutterResponse']
if not any(word in aname for word in skip_names):
msg = f'{aname} is not an Array ... assume equal'
self.log.warning(msg)
raise NotImplementedError(f'{aname} __eq__')
Expand Down Expand Up @@ -691,7 +694,7 @@ def build_dataframe(self) -> None:
skip_pandas = (
'params', 'gpdt', 'bgpdt', 'eqexin', 'grid_point_weight', 'psds',
'monitor1', 'monitor3', 'superelement_tables',
'cstm', 'trmbu', 'trmbd')
'cstm', 'trmbu', 'trmbd', 'vg_vf_response')
for result_type in result_types:
if result_type in skip_pandas or result_type.startswith('responses.'):
#self.log.debug('skipping %s' % result_type)
Expand Down
3 changes: 3 additions & 0 deletions pyNastran/op2/op2_interface/hdf5_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,9 @@ def load_op2_from_hdf5_file(model: OP2, h5_file,
for result_name in h5_subcase.keys():
assert isinstance(result_name, str), f'result_name={result_name}; type={type(result_name)}'

if result_name in ['vg_vf_response']:
log.warning(f' skipping {result_name}...')
continue
if result_name in ['eigenvalues', 'eigenvalues_fluid']:
#log.warning(' skipping %r...' % result_name)
h5_result = h5_subcase.get(result_name)
Expand Down
2 changes: 1 addition & 1 deletion pyNastran/op2/op2_interface/op2_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4303,7 +4303,7 @@ def read_ovg(op2_reader: OP2Reader) -> None:
method, fdata2,
subcase_id=subcase_id, cref=cref,
is_xysym=is_xysym, is_xzsym=is_xzsym,
f06_units=op2.in_units)
in_units=op2.in_units)

op2.op2_results.vg_vf_response[subcase_id] = resp
return

0 comments on commit da4b064

Please sign in to comment.