-
Notifications
You must be signed in to change notification settings - Fork 57
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
Improve docs and code of newmark_ss #267
Conversation
- Fix equations to match the ones in the code, correct parenthesis, etc - Bring M^{-1} term to the inside of the matrix multiplying the forces, for consistency of dimensions. Replace curly brackets by square brackets since it is a matrix and not a vector
SHARPy specific notation goes last
This is a numpy best practice when multiplying matrices
Codecov Report
@@ Coverage Diff @@
## develop #267 +/- ##
========================================
Coverage 67.69% 67.70%
========================================
Files 166 166
Lines 26709 26710 +1
========================================
+ Hits 18081 18083 +2
+ Misses 8628 8627 -1
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot Be for improving the comments and code. Very much appreciated! Good to see UM/NASTy people here.
Changes in the documentation of
newmark_ss
I spotted some small errors in the documentation of the
newmark_ss
function (the code was ok!) and I decided to improve them since this is a pretty good tutorial on the method that may be useful for my team as well. Therefore I did some improvements such asChanges in the code of
newmark_ss
I tried to make the code slightly faster and more accurate by reusing the factorization of the Ass1 matrix and by using the factorization of the M matrix to compute the multiplication by the inverse (due to the triangular structure of the factorization this is both faster and more accurate). This caused a change in the function arguments since it now takes the M matrix instead of its inverse. I also added the option to factorize the M matrix using Cholesky, but I did not enable that option since I am not familiar enough with SHARPy's theory to be 100% sure that the M matrix is symmetric positive definite. I would like to ask the core developers to consider enabling that option on the calls to
newmark_ss
. It has better numerical properties than the LU decomposition. I cleaned up some dead code close to the other changes I made and replaced some of the usages ofnp.dot
by@
for matrix multiplication, since this is a NumPy best practice.Changes in the installation documentation
I did some small additions to the installation with Docker section that I found useful when I used it for testing:
Testing of the changes
I tested the changes on Docker, and I am pasting the output below. I believe all tests passed but I would like to double check if the warnings are expected.