Skip to content

Commit

Permalink
Merge pull request #1027 from kiracofe8/bearing_seal_locals_fix
Browse files Browse the repository at this point in the history
Fix issued related to use of locals() in bearing_seal_element.py
  • Loading branch information
raphaeltimbo authored Jan 22, 2024
2 parents c87692a + 79522eb commit 81a92ee
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions ross/bearing_seal_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,23 @@ def __init__(
"myx",
]

# all args to coefficients
args_dict = locals()

if kyy is None:
args_dict["kyy"] = kxx
kyy = kxx
if cyy is None:
args_dict["cyy"] = cxx
cyy = cxx

if myy is None:
if mxx is None:
args_dict["mxx"] = 0
args_dict["myy"] = 0
mxx = 0
myy = 0
else:
args_dict["myy"] = mxx
myy = mxx

if mxx is None:
mxx = 0

# all args to coefficients. output of locals() should be READ ONLY
args_dict = locals()

# check coefficients len for consistency
coefficients_len = []
Expand Down Expand Up @@ -1841,20 +1844,22 @@ def __init__(

new_args = ["kzz", "czz", "mzz"]

args_dict = locals()
coefficients = {}

if kzz is None:
args_dict["kzz"] = kxx * 0.0
kzz = kxx * 0.0
if czz is None:
args_dict["czz"] = cxx * 0.0
czz = cxx * 0.0

if mzz is None:
if mxx is None:
args_dict["mxx"] = 0
args_dict["mzz"] = 0
mxx = 0
mzz = 0
else:
args_dict["mzz"] = mxx * 0.0
mzz = mxx * 0.0

# output of locals() should be READ ONLY
args_dict = locals()

# check coefficients len for consistency
coefficients_len = []
Expand Down

0 comments on commit 81a92ee

Please sign in to comment.