Skip to content

Commit

Permalink
Merge pull request #146 from ritchie46/addRestraintToNodeWithOnePinne…
Browse files Browse the repository at this point in the history
…dElement

Add restraint to a node that has exactly one pinned connection
  • Loading branch information
smith120bh authored Aug 28, 2023
2 parents d8a5d47 + ba6c6b7 commit 6b785e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
"linalg",
"linspace",
"loadcase",
"matplotlib",
"Mmax",
"Mmin",
"ndarray",
"Nmax",
"Nmin",
"numpy",
"perp",
"postprocess",
"pspec",
Expand Down
8 changes: 5 additions & 3 deletions anastruct/fem/system_components/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ def check_internal_hinges(system: "SystemElements", node_id: int) -> None:
else:
hinges.append(0)

# If at least two elements are connected
# and no more than one is rigidly connected
if len(hinges) > 1 and len(hinges) - sum(hinges) <= 1:
# If at least one element is connected
# and no more than one element is rigidly connected
if (len(hinges) > 1 and len(hinges) - sum(hinges) <= 1) or (
len(hinges) == 1 and sum(hinges) == 1
):
system.internal_hinges.append(node)

if node in system.internal_hinges:
Expand Down

0 comments on commit 6b785e2

Please sign in to comment.