Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stiffness matrix feature to SystemElements class #332

Merged
merged 5 commits into from
Oct 27, 2024

Conversation

bldrkamal
Copy link
Contributor

This pull request introduces a new method, get_stiffness_matrix(), to the SystemElements class. The method allows users to retrieve and print the stiffness matrix of a specific element by its ID.

Key changes:
New Method: get_stiffness_matrix(element_id) in SystemElements.
This method accepts an element_id as input.

  • It checks if the element exists and is an instance of the Element class.

  • If the element contains a stiffness matrix, it prints and returns the matrix.

  • If the element doesn't exist or doesn't have a stiffness matrix, appropriate error messages are printed.

This feature makes it easier to inspect and validate the stiffness matrices of elements within the system, especially useful for debugging and structural analysis. Some students that will like to create their global stiffness matrix will find this useful.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for contributing to the open-source anaStruct project! Your contribution will help thousands of engineers work more efficiently and accuractely.

Now that you've created your first pull request here, please don't go away; take a look at the bottom of this page for the automated checks that should already be running. If they pass, great! If not, please click on 'Details' and see if you can fix the problem they've identified. A maintainer should be along shortly to review your pull request and help get it added to anaStruct!

@smith120bh
Copy link
Collaborator

@bldrkamal : This looks great - thanks so much! Your code and PR is well-documented, you added tests, and there's obvious value of what you're adding! Please just fix the linting issues, and I think mypy is also going to complain at you that you don't have a type definition on your function. Let me know if you need any help with any of that!

And I'll see if I can go fix the repo settings here so that I don't have to keep clicking "Approve Workflow Run" on your PR, and it actually auto-runs the tests!

@bldrkamal
Copy link
Contributor Author

bldrkamal commented Oct 20, 2024 via email

@smith120bh smith120bh merged commit 367ad17 into ritchie46:master Oct 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants