-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/povolny1/polar decomposition #277
base: develop
Are you sure you want to change the base?
Conversation
…alculates the polar decomposition of a 3x3 square matrix
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.
Can you add some tests?
src/fixedSizeSquareMatrixOpsImpl.hpp
Outdated
error += RRTMinusI[i][j] * RRTMinusI[i][j]; | ||
} | ||
} | ||
} |
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.
Do you want to error out (or at least return a signal) if it doesn't converge?
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.
What should I use to print an error message? Using LVARRAY_WARNING_IF() fails to compile since it calls std::cout.
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.
I'd either return the achieved tolerance or the number of iterations or just a boolean to indicate success or failure. Alternatively you can use LVARRAY_ERROR_IF
which works on device to just kill the program.
Unit test is implemented and passing, I will make an accompanying PR for GEOSX soon |
This PR implements the polar decomposition for real square 2x2 and 3x3 matrices using Higham's iterative algorithm. This is needed for some constitutive models and particularly a new hypoelastic update that I'm implementing.