-
Notifications
You must be signed in to change notification settings - Fork 191
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
Support complex numbers in serial linear solvers, add BLAS zdot #6117
Conversation
6f0bbed
to
2e0a9e1
Compare
548e8a0
to
2621cc6
Compare
@wthrowe would you be willing to review this one? |
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.
Looks overall OK, but it's not compiling, and it looks like the intermediate commits won't compile even after the overall problems are fixed.
double>); | ||
static_assert(std::is_same_v<typename tt::get_complex_or_fundamental_type_t< | ||
std::vector<std::complex<int>>>, | ||
std::complex<int>>); |
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.
std::complex
is only guaranteed to work for floating-point types.
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.
Changed to double
@@ -42,7 +42,7 @@ SPECTRE_TEST_CASE("Unit.LinearSolver.Serial.BuildMatrix", | |||
{ | |||
INFO("Build a simple dense matrix"); | |||
const blaze::DynamicMatrix<double> matrix{{4., 1.}, {3., 1.}}; | |||
const helpers::ApplyMatrix linear_operator{matrix}; | |||
const helpers::ApplyMatrix<double> linear_operator{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.
Wrong commit?
Still doesn't compile. |
42d9f40
to
6db96f4
Compare
Should be fixed now! |
Proposed changes
Adds complex numbers support to the serial linear solvers, which are used as preconditioners in the parallel linear solvers. Most notably, extends the GMRES algorithm to complex arithmetics, which involves the inner product on the vector space of complex numbers.
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments