Skip to content
Snippets Groups Projects
Commit de1a2cd9 authored by Max Kahnt's avatar Max Kahnt Committed by Elias Pipping
Browse files

Add upper solver w/o additional copy

parent 4adc0649
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,22 @@ namespace MatrixVector {
x = 0;
Vector r = b;
if (transpose) {
// TODO: not yet handled
for (auto it = U.beforeEnd(); it != U.beforeBegin(); --it) {
size_t i = it.index();
auto cIt = it->beforeEnd();
assert(cIt.index() == i);
auto diagonal = *cIt;
if (ignore != nullptr and (*ignore)[i].all())
continue;
x[i] = r[i] / diagonal;
cIt--;
for (; cIt != it->beforeBegin(); --cIt) {
size_t j = cIt.index();
assert(j < i);
r[j] -= *cIt * x[i];
}
}
} else {
for (auto it = U.beforeEnd(); it != U.beforeBegin(); --it) {
size_t i = it.index();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment