Skip to content

Commit dcb03ba

Browse files
author
Steve Doyle
committed
updates from main
1 parent b0ba439 commit dcb03ba

40 files changed

+1608
-1107
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
matrix:
6363
# '3.9', '3.11-dev'
64-
python-version: ['3.10', '3.11', '3.12', '3.13']
64+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
6565
os: [ubuntu-latest]
6666
# , macos-latest, windows-latest
6767
mode: ['latest', 'latest_basic', 'old', 'latest_pyqt5_gui', 'latest_pyqt6_gui', 'latest_pyside2_gui', ]
@@ -90,18 +90,25 @@ jobs:
9090
#- {python-version: '3.11', mode: 'latest_pyqt5_gui'}
9191
- {python-version: '3.11', mode: 'latest_pyqt6_gui'}
9292
#- {python-version: '3.11', mode: 'latest_pyside2_gui'}
93-
- {python-version: '3.11', mode: 'latest_pyside6_gui'} # DLL error
93+
#- {python-version: '3.11', mode: 'latest_pyside6_gui'} # DLL error
9494

9595
- {python-version: '3.12', mode: 'old'} # redundant
9696
- {python-version: '3.12', mode: 'latest_pyqt5_gui'}
9797
- {python-version: '3.12', mode: 'latest_pyqt6_gui'}
9898
- {python-version: '3.12', mode: 'latest_pyside2_gui'}
99-
#- {python-version: '3.11', mode: 'latest_pyside6_gui'}
99+
- {python-version: '3.12', mode: 'latest_pyside6_gui'}
100100

101101
- {python-version: '3.13', mode: 'old'} # redundant
102102
- {python-version: '3.13', mode: 'latest_pyqt5_gui'}
103103
- {python-version: '3.13', mode: 'latest_pyqt6_gui'}
104-
- {python-version: '3.13', mode: 'latest_pyside2_gui'}
104+
#- {python-version: '3.13', mode: 'latest_pyside2_gui'}
105+
106+
- {python-version: '3.14', mode: 'old'} # redundant
107+
- {python-version: '3.14', mode: 'latest_pyqt5_gui'}
108+
- {python-version: '3.14', mode: 'latest_pyqt6_gui'}
109+
- {python-version: '3.14', mode: 'latest_pyside2_gui'}
110+
111+
#- {python-version: '3.15-dev', mode: 'old'}
105112
fail-fast: false
106113
#- continue-on-error: ${{ matrix.experimental }}
107114
#strategy:
@@ -185,47 +192,47 @@ jobs:
185192
pip install 'pandas>=1.0' matplotlib
186193
187194
- name: Install latest packages (h5py)
188-
if: ${{ matrix.python-version != '3.12' && (matrix.mode == 'latest' ||
195+
if: ${{ matrix.python-version != '3.14-dev' && (matrix.mode == 'latest' ||
189196
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
190197
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
191198
run: |
192199
pip install h5py tables
193200
194201
- name: Install latest packages (imageio, pillow)
195202
#if: ${{ (
196-
#if: ${{ matrix.python-version != '3.12' && (
197-
# matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
198-
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
199-
if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
200-
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
203+
if: ${{ matrix.python-version != '3.14-dev' && (
204+
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
205+
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
206+
#if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
207+
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
201208
run: |
202209
pip install imageio pillow>=10.1.0
203210
204211
- name: Install latest packages (vtk)
205-
#if: ${{ matrix.python-version != '3.13' && (
206-
# matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
207-
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
208-
if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
209-
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
212+
if: ${{ matrix.python-version != '3.14-dev' && (
213+
matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
214+
matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
215+
#if: ${{ (matrix.mode == 'latest_pyside2_gui' || matrix.mode == 'latest_pyside6_gui' ||
216+
# matrix.mode == 'latest_pyqt5_gui' || matrix.mode == 'latest_pyqt6_gui') }}
210217
run: |
211218
pip install vtk qtpy
212219
213-
- if: ${{ matrix.mode == 'latest_pyside2_gui' && matrix.python-version != '3.13' }}
220+
- if: ${{ matrix.mode == 'latest_pyside2_gui' && matrix.python-version != '3.15-dev' }}
214221
name: Install PySide2
215222
run: |
216223
pip install PySide2
217224
218-
- if: ${{ matrix.mode == 'latest_pyside6_gui' && matrix.python-version != '3.13' }}
225+
- if: ${{ matrix.mode == 'latest_pyside6_gui' && matrix.python-version != '3.15-dev' }}
219226
name: Install PySide6
220227
run: |
221228
pip install PySide6
222229
223-
- if: ${{ matrix.mode == 'latest_pyqt5_gui' && matrix.python-version != '3.13' }}
230+
- if: ${{ matrix.mode == 'latest_pyqt5_gui' && matrix.python-version != '3.15-dev' }}
224231
name: Install PyQt5
225232
run: |
226233
pip install PyQt5
227234
228-
- if: ${{ matrix.mode == 'latest_pyqt6_gui' && matrix.python-version != '3.13' }}
235+
- if: ${{ matrix.mode == 'latest_pyqt6_gui' && matrix.python-version != '3.15-dev' }}
229236
name: Install PyQt6
230237
run: |
231238
pip install PyQt6

pyNastran/bdf/bdf_interface/add_card.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,9 @@ def __init__(self, add_methods: AddMethods):
763763
self._add_methods = add_methods
764764

765765
def add_cord2r(self, cid: int,
766-
origin: Optional[list[float] | NDArray3float],
767-
zaxis: Optional[list[float] | NDArray3float],
768-
xzplane: Optional[list[float] | NDArray3float],
766+
origin: list[float] | NDArray3float,
767+
zaxis: list[float] | NDArray3float,
768+
xzplane: list[float] | NDArray3float,
769769
rid: int=0, setup: bool=True, comment: str='') -> CORD2R:
770770
"""
771771
Creates the CORD2R card, which defines a rectangular coordinate
@@ -793,9 +793,9 @@ def add_cord2r(self, cid: int,
793793
return coord
794794

795795
def add_cord2c(self, cid: int,
796-
origin: Optional[list[float] | NDArray3float],
797-
zaxis: Optional[list[float] | NDArray3float],
798-
xzplane: Optional[list[float] | NDArray3float],
796+
origin: list[float] | NDArray3float,
797+
zaxis: list[float] | NDArray3float,
798+
xzplane: list[float] | NDArray3float,
799799
rid: int=0, setup: bool=True, comment: str='') -> CORD2C:
800800
"""
801801
Creates the CORD2C card, which defines a cylindrical coordinate
@@ -823,9 +823,9 @@ def add_cord2c(self, cid: int,
823823
return coord
824824

825825
def add_cord2s(self, cid: int,
826-
origin: Optional[list[float] | NDArray3float],
827-
zaxis: Optional[list[float] | NDArray3float],
828-
xzplane: Optional[list[float] | NDArray3float],
826+
origin: list[float] | NDArray3float,
827+
zaxis: list[float] | NDArray3float,
828+
xzplane: list[float] | NDArray3float,
829829
rid: int=0, setup: bool=True, comment: str='') -> CORD2S:
830830
"""
831831
Creates the CORD2C card, which defines a spherical coordinate
@@ -5361,7 +5361,7 @@ def add_qbdy3(self, sid: int, q0: float, eids: list[int],
53615361
a comment for the card
53625362
53635363
"""
5364-
load = QBDY3(sid, q0, cntrlnd, eids, comment=comment)
5364+
load = QBDY3(sid, q0, control_node, eids, comment=comment)
53655365
self._add_methods.add_thermal_load_object(load)
53665366
return load
53675367

@@ -5542,7 +5542,8 @@ def add_phbdy(self, pid, af=None, d1=None, d2=None, comment='') -> PHBDY:
55425542
self._add_methods.add_phbdy_object(prop)
55435543
return prop
55445544

5545-
def add_conv(self, eid, pconid, ta, film_node=0, cntrlnd=0, comment='') -> CONV:
5545+
def add_conv(self, eid, pconid, ta,
5546+
film_node: int=0, control_node: int=0, comment='') -> CONV:
55465547
"""
55475548
Creates a CONV card
55485549
@@ -5559,14 +5560,14 @@ def add_conv(self, eid, pconid, ta, film_node=0, cntrlnd=0, comment='') -> CONV:
55595560
and higher
55605561
film_node : int; default=0
55615562
Point for film convection fluid property temperature
5562-
cntrlnd : int; default=0
5563+
control_node : int; default=0
55635564
Control point for free convection boundary condition
55645565
comment : str; default=''
55655566
a comment for the card
55665567
55675568
"""
55685569
boundary_condition = CONV(eid, pconid, ta,
5569-
film_node=film_node, cntrlnd=cntrlnd,
5570+
film_node=film_node, control_node=control_node,
55705571
comment=comment)
55715572
self._add_methods.add_thermal_bc_object(boundary_condition, boundary_condition.eid)
55725573
return boundary_condition
@@ -5596,7 +5597,7 @@ def add_convm(self, eid, pconvm, ta1, film_node=0, cntmdot=0,
55965597
0/blank is only allowed when mdot > 0
55975598
mdot : float; default=1.0
55985599
a multiplier for the mass flow rate in case there is no
5599-
point associated with the CNTRLND field
5600+
point associated with the CONTROL_NODE field
56005601
required if cntmdot = 0
56015602
comment : str; default=''
56025603
a comment for the card
@@ -5620,10 +5621,10 @@ def add_radm(self, radmid, absorb, emissivity, comment='') -> RADM:
56205621
self._add_methods.add_thermal_bc_object(boundary_condition, boundary_condition.radmid)
56215622
return boundary_condition
56225623

5623-
def add_radbc(self, nodamb: int, famb: float, cntrlnd: int, eids: list[int],
5624+
def add_radbc(self, nodamb: int, famb: float, control_node: int, eids: list[int],
56245625
comment: str='') -> RADBC:
56255626
"""Creates a RADBC card"""
5626-
boundary_condition = RADBC(nodamb, famb, cntrlnd, eids, comment=comment)
5627+
boundary_condition = RADBC(nodamb, famb, control_node, eids, comment=comment)
56275628
self._add_methods.add_thermal_bc_object(boundary_condition, boundary_condition.nodamb)
56285629
return boundary_condition
56295630

pyNastran/bdf/bdf_interface/verify_validate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def verify_bdf(model: BDF, xref: bool) -> None:
2626
for unused_key, card in sorted(model.elements.items()):
2727
try:
2828
card._verify(xref)
29-
except Exception:
29+
except Exception: # pragma: no cover
3030
exc_type, exc_value, exc_traceback = sys.exc_info()
3131
print(repr(traceback.format_exception(exc_type, exc_value,
3232
exc_traceback)))
@@ -43,6 +43,7 @@ def verify_bdf(model: BDF, xref: bool) -> None:
4343
_verify_dict(model.properties, xref)
4444
_verify_dict(model.properties_mass, xref)
4545
_verify_dict(model.materials, xref)
46+
_verify_dict(model.plotels, xref)
4647

4748
_verify_dict(model.dequations, xref)
4849
_verify_dict(model.desvars, xref)

pyNastran/bdf/cards/coordinate_systems.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ def raw_fields(self):
14881488
return list_fields
14891489

14901490
# Not working
1491-
def _verify(self, xref):
1491+
def _verify(self, xref: bool) -> None:
14921492
"""
14931493
Verifies all methods for this object work
14941494
@@ -2127,7 +2127,7 @@ def _finish_setup(self):
21272127
self.setup()
21282128
#self.setup_global_cord2x()
21292129

2130-
def _verify(self, xref):
2130+
def _verify(self, xref: bool) -> None:
21312131
"""
21322132
Verifies all methods for this object work
21332133
@@ -2401,7 +2401,7 @@ def to_cord2x(self, model, rid=0):
24012401
model.coords[self.cid] = coord
24022402
return coord
24032403

2404-
def _verify(self, xref):
2404+
def _verify(self, xref: bool) -> None:
24052405
"""
24062406
Verifies all methods for this object work
24072407

pyNastran/bdf/cards/elements/axisymmetric_shells.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def add_card(cls, card: BDFCard, comment: str=''):
179179
assert len(card) <= 7, f'len(CTRAX3 card) = {len(card):d}\ncard={card}'
180180
return CTRAX3(eid, pid, nids, theta=theta, comment=comment)
181181

182-
def _verify(self, xref):
182+
def _verify(self, xref: bool) -> None:
183183
eid = self.eid
184184
pid = self.Pid()
185185
nids = self.node_ids
@@ -360,7 +360,7 @@ def add_card(cls, card, comment=''):
360360
assert len(card) <= 10, f'len(CTRAX6 card) = {len(card):d}\ncard={card}'
361361
return CTRAX6(eid, pid, nids, theta=theta, comment=comment)
362362

363-
def _verify(self, xref):
363+
def _verify(self, xref: bool) -> None:
364364
eid = self.eid
365365
pid = self.Pid()
366366
nids = self.node_ids
@@ -549,7 +549,7 @@ def add_card(cls, card, comment=''):
549549
assert len(card) <= 10, f'len(CTRIAX card) = {len(card):d}\ncard={card}'
550550
return CTRIAX(eid, pid, nids, theta_mcid=theta_mcid, comment=comment)
551551

552-
def _verify(self, xref):
552+
def _verify(self, xref: bool) -> None:
553553
eid = self.eid
554554
pid = self.Pid()
555555
nids = self.node_ids
@@ -780,7 +780,7 @@ def uncross_reference(self) -> None:
780780
self.nodes_ref: Optional[list[Any]] = None
781781
self.mid_ref: Optional[Any] = None
782782

783-
def _verify(self, xref):
783+
def _verify(self, xref: bool) -> None:
784784
eid = self.eid
785785
nids = self.node_ids
786786
unused_edges = self.get_edge_ids()
@@ -1100,7 +1100,7 @@ def node_ids(self):
11001100
return self.nodes
11011101
return self._node_ids(nodes=self.nodes_ref, allow_empty_nodes=True)
11021102

1103-
def _verify(self, xref):
1103+
def _verify(self, xref: bool) -> None:
11041104
"""
11051105
Verifies all methods for this object work
11061106
@@ -1250,7 +1250,7 @@ def flip_normal(self):
12501250
def node_ids(self):
12511251
return self._node_ids(allow_empty_nodes=True)
12521252

1253-
def _verify(self, xref):
1253+
def _verify(self, xref: bool) -> None:
12541254
"""
12551255
Verifies all methods for this object work
12561256
@@ -1404,7 +1404,7 @@ def flip_normal(self):
14041404
def node_ids(self):
14051405
return self._node_ids(nodes=self.nodes_ref, allow_empty_nodes=True)
14061406

1407-
def _verify(self, xref):
1407+
def _verify(self, xref: bool) -> None:
14081408
"""
14091409
Verifies all methods for this object work
14101410

pyNastran/bdf/cards/elements/bars.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def add_card(cls, card, comment=''):
339339
assert len(card) <= 9, f'len(CBARAO card) = {len(card):d}\ncard={card}'
340340
return CBARAO(eid, scale, x, comment=comment)
341341

342-
def _verify(self, xref):
342+
def _verify(self, xref: bool) -> None:
343343
pass
344344

345345
def raw_fields(self):
@@ -675,7 +675,7 @@ def add_op2_data(cls, data, comment=''):
675675
return CBAR(eid, pid, [ga, gb], x, g0,
676676
offt, pa, pb, wa, wb, comment=comment)
677677

678-
def _verify(self, xref: bool):
678+
def _verify(self, xref: bool) -> None:
679679
eid = self.eid
680680
unused_pid = self.Pid()
681681
unused_edges = self.get_edge_ids()
@@ -1473,7 +1473,7 @@ def write_card(self, size: int=8, is_double: bool=False) -> str:
14731473
return self.comment + print_card_8(card)
14741474
return self.comment + print_card_16(card)
14751475

1476-
def _verify(self, xref):
1476+
def _verify(self, xref: bool) -> None:
14771477
unused_edges = self.get_edge_ids()
14781478

14791479

@@ -1967,7 +1967,7 @@ def Area(self):
19671967
raise RuntimeError(msg)
19681968
return self.pid_ref.Area()
19691969

1970-
def _verify(self, xref):
1970+
def _verify(self, xref: bool) -> None:
19711971
unused_edges = self.get_edge_ids()
19721972

19731973
def cross_reference(self, model: BDF) -> None:

pyNastran/bdf/cards/elements/beam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ def uncross_reference(self) -> None:
857857
self.g0_ref = None
858858
self.pid_ref = None
859859

860-
def _verify(self, xref):
860+
def _verify(self, xref: bool) -> None:
861861
eid = self.eid
862862
unused_pid = self.Pid()
863863
unused_edges = self.get_edge_ids()

0 commit comments

Comments
 (0)