Repository navigation
Handle empty sample sets in member result arrays - #373
Open
Tonylo-lab wants to merge 1 commit into
Open
Tonylo-lab wants to merge 1 commit into
Tonylo-lab wants to merge 1 commit into
Conversation
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.
Sparse sample positions on a physical member can leave a submember with no points to evaluate.
_extract_vector_results()then concatenates an empty list and raisesValueError: need at least one array to concatenate. This affects the deflection, shear, moment, axial and torque arrays, including 20-point sampling on a member split into 32 submembers.Return an empty
(2, 0)result when the sample array is empty so the physical member can assemble the remaining results. OnlyPynite/Member3D.pyis changed.Minimal reproduction (SI units):
The expected endpoint displacements are 0 and -0.005625 m, matching the cantilever solution; before the fix this raises instead.
Validation on Windows / Python 3.12.15:
git diff --check: passed.Verification scripts and reports are retained locally outside the repository. No test or changelog files are added to this PR.
Not run: the complete test suite, graphical visualization, or other platforms/Python versions.
AI assistance: OpenAI Codex assisted with investigation, the minimal patch and local verification.