Skip to content

Commit 90a365a

Browse files
committed
move TSTEP1 cards from tstepnls to tsteps dictionary
1 parent fe0b7f2 commit 90a365a

File tree

5 files changed

+14
-27
lines changed

5 files changed

+14
-27
lines changed

pyNastran/bdf/bdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2852,7 +2852,7 @@ def add_card(cls, card: BDFCard, comment: str=''):
28522852
'NLPARM': (NLPARM, add_methods.add_nlparm_object),
28532853
'NLPCI': (NLPCI, add_methods.add_nlpci_object),
28542854
'TSTEP': (TSTEP, add_methods.add_tstep_object),
2855-
'TSTEP1': (TSTEP1, add_methods.add_tstepnl_object),
2855+
'TSTEP1': (TSTEP1, add_methods.add_tstep_object),
28562856
'TSTEPNL': (TSTEPNL, add_methods.add_tstepnl_object),
28572857

28582858
'TF': (TF, add_methods.add_tf_object),

pyNastran/bdf/bdf_interface/attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@
333333
'dphases': ['DPHASE'],
334334
'nlparms': ['NLPARM'],
335335
'nlpcis': ['NLPCI'],
336-
'tsteps': ['TSTEP'],
337-
'tstepnls': ['TSTEPNL', 'TSTEP1'],
336+
'tsteps': ['TSTEP', 'TSTEP1'],
337+
'tstepnls': ['TSTEPNL'],
338338
'transfer_functions': ['TF'],
339339
'delays': ['DELAY'],
340340
'rotors': ['ROTORG', 'ROTORD'],

pyNastran/bdf/mesh_utils/remove_unused.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def remove_unused(bdf_filename: PathLike,
7979
unreferenced_types_case_control = {
8080
'EIGR', 'EIGRL', 'EIGB', 'EIGP', 'EIGC',
8181
'FREQ', 'FREQ1', 'FREQ2',
82-
'TSTEP', 'TSTEPNL',
82+
'TSTEP', 'TSTEP1', 'TSTEPNL',
8383
'NLPCI', 'NLPARM',
8484

8585
# aero

pyNastran/bdf/test/test_bdf.py

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,28 +1787,15 @@ def _check_case_parameters(subcase: Subcase,
17871787
stop_on_failure: bool=True) -> int:
17881788
"""helper method for ``check_case``"""
17891789
log = fem.log
1790-
if fem.sol in {401, 402}:
1791-
# TSTEP references a TSTEP1, but not a TSTEP
1792-
# TSTEP1s are stored in tstepnls
1793-
if any(subcase.has_parameter('TIME', 'TSTEP')):
1794-
if 'TSTEP' in subcase:
1795-
tstep_id: int = subcase.get_int_parameter('TSTEP')
1796-
else: # pragma: no cover
1797-
raise NotImplementedError(subcase)
1798-
if tstep_id not in fem.tstepnls:
1799-
raise RuntimeError(_tstep_msg(fem, subcase, tstep_id))
1800-
else:
1801-
raise RuntimeError(f'missing TSTEP in case control deck\n{subcase}')
1802-
else:
1803-
if any(subcase.has_parameter('TIME', 'TSTEP')):
1804-
if 'TIME' in subcase:
1805-
tstep_id: int = subcase.get_int_parameter('TIME')
1806-
elif 'TSTEP' in subcase:
1807-
tstep_id: int = subcase.get_int_parameter('TSTEP')
1808-
else: # pragma: no cover
1809-
raise NotImplementedError(subcase)
1810-
if tstep_id not in fem.tsteps:
1811-
raise RuntimeError(_tstep_msg(fem, subcase, tstep_id))
1790+
if any(subcase.has_parameter('TIME', 'TSTEP')):
1791+
if 'TIME' in subcase:
1792+
tstep_id: int = subcase.get_int_parameter('TIME')
1793+
elif 'TSTEP' in subcase:
1794+
tstep_id: int = subcase.get_int_parameter('TSTEP')
1795+
else: # pragma: no cover
1796+
raise NotImplementedError(subcase)
1797+
if tstep_id not in fem.tsteps:
1798+
raise RuntimeError(_tstep_msg(fem, subcase, tstep_id))
18121799

18131800
check_subcase_dmig_matrices(fem, subcase)
18141801
if 'TSTEPNL' in subcase:

pyNastran/dev/bdf_vectorized3/bdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,7 @@ def add_card(cls, card, comment=''):
22722272
'NLPARM' : (NLPARM, add_methods.add_nlparm_object),
22732273
'NLPCI' : (NLPCI, add_methods.add_nlpci_object),
22742274
'TSTEP' : (TSTEP, add_methods.add_tstep_object),
2275-
'TSTEP1' : (TSTEP1, add_methods.add_tstepnl_object),
2275+
'TSTEP1' : (TSTEP1, add_methods.add_tstep_object),
22762276
'TSTEPNL' : (TSTEPNL, add_methods.add_tstepnl_object),
22772277

22782278
# nx_opt

0 commit comments

Comments
 (0)