Repository navigation
Make internal hinge detection independent of element order - #492
Open
mitchell-tesch wants to merge 1 commit into
Open
mitchell-tesch wants to merge 1 commit into
mitchell-tesch wants to merge 1 commit into
Conversation
Since 102cb38, check_internal_hinges() runs on every add_element(). It released the remaining elements of a node as soon as the elements added so far met the hinge criteria, and never undid this. A joint where only one of three elements is released became a hinge if the released element was added before the third one (anastruct#464). check_internal_hinges() now records the releases it adds and undoes them before re-evaluating a node. Internal hinges are matched by node id, as the post-processing replaces the node objects, and add_element() copies the spring dict, as it may be shared by several elements. Fixes anastruct#464 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #464.
Since 102cb38,
check_internal_hinges()runs on everyadd_element()so hinges show beforesolve(). It released the remaining elements of a node as soon as the elements added so far met the hinge criteria, and never undid this. In #464, node 3 connects beam 2, beam 3 (released at node 3) and column 7. Beam 3 is added before column 7, so node 3 became a hinge and beam 2 and column 7 were released too.Change
check_internal_hinges()records the releases it adds and undoes them before re-evaluating a node. The hinge criteria are unchanged.Nodeobjects. Before, everysolve()appended the node again.add_element()copies thespringdict, so a dict shared by several elements isn't modified.Result (#464 model, dead load, moment at node 3)
The new test builds the joint in three element orders; it fails on
master. pytest, pylint, mypy and black pass.Related: #482 also fixes this, with a different hinge model (springs are never modified). I'm happy to close this PR if #482 is merged first. This PR merges cleanly with #487, #490 and #491.