Skip to content
Snippets Groups Projects
Commit 72b5bf3c authored by Elias Pipping's avatar Elias Pipping
Browse files

Add lower solver w/o additional copy

parent de1a2cd9
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,18 @@ namespace MatrixVector { ...@@ -10,7 +10,18 @@ namespace MatrixVector {
x = 0; x = 0;
Vector r = b; Vector r = b;
if (transpose) { if (transpose) {
// TODO: not yet handled for (auto it = A.begin(); it != A.end(); ++it) {
const size_t i = it.index();
if (ignore != nullptr and (*ignore)[i].all())
continue;
auto cIt = it->begin();
assert(cIt.index() == it.index());
x[i] = r[i] / *cIt;
for (; cIt != it->end(); ++cIt) {
const size_t j = cIt.index();
r[j] -= x[i] * *cIt;
}
}
} else { } else {
for (auto it = A.begin(); it != A.end(); ++it) { for (auto it = A.begin(); it != A.end(); ++it) {
size_t i = it.index(); 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