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

Feature/povolny1/polar decomposition #277

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

povolny1
Copy link

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.

Copy link
Collaborator

@corbett5 corbett5 left a 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 Show resolved Hide resolved
src/fixedSizeSquareMatrixOpsImpl.hpp Outdated Show resolved Hide resolved
error += RRTMinusI[i][j] * RRTMinusI[i][j];
}
}
}
Copy link
Collaborator

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?

Copy link
Author

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.

Copy link
Collaborator

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.

src/fixedSizeSquareMatrixOpsImpl.hpp Show resolved Hide resolved
@povolny1
Copy link
Author

povolny1 commented Mar 9, 2023

Unit test is implemented and passing, I will make an accompanying PR for GEOSX soon

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