Commit 22ff0f69 authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

display converging vector indices in GCR

parent 3bf59a80
......@@ -102,8 +102,10 @@ private:
P max = 0.0;
int nb_removed_before = 0;
int nb_kept_direction = 0;
std::cerr << "Lost direction [";
for (int j = 0; j < _nbRHS; ++j) {
int k = J[j];
if (k != -1) { // compute norm of not yet converged Residual vectors
const auto N = RJ.get_norm(k, A);
const auto epsilon_j = epsilon.size() > 1 ? epsilon[j] : epsilon.front();
......@@ -115,7 +117,9 @@ private:
J_work[j] = J[j] - nb_removed_before;
++ nb_kept_direction;
} else {
// save converged column from XJ back into X
std::cerr << " " << j;
std::copy(XJ.get_vect(k),
XJ.get_vect(k)+XJ.get_nb_row(),
X.get_vect(j));
......@@ -128,7 +132,7 @@ private:
J_work[j] = -1;
}
}
std::cerr << " ]\n";
for (int i = 0; i < _nbRHS; ++i) { // compacting XJ and RJ
if (J_work[i] != -1) {
if (J_work[i] != J[i]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment