Reduce err properly

This commit is contained in:
Shikhar Kumar 2019-07-22 14:07:58 -04:00
parent 596eab4bb6
commit 6e77ddc532

View file

@ -133,7 +133,6 @@ int cmfd_linsolver_1g(const double* A_data, const double* b, double* x,
// Check convergence
err = std::sqrt(err / cmfd::dim);
std::cout << err << "\n";
if (err < tol)
return igs;
@ -220,7 +219,7 @@ int cmfd_linsolver_2g(const double* A_data, const double* b, double* x,
// Compute residual and update error
double res = (tmpx[irow] - x[irow]) / tmpx[irow];
err = res * res;
err += res * res;
}
}