Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Common/src/linear_algebra/CSysSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,6 @@ unsigned long CSysSolve<ScalarType>::BCGSTAB_LinSolver(const CSysVector<ScalarTy

ScalarType alpha = 1.0, omega = 1.0, rho = 1.0, rho_prime = 1.0;
ScalarType norm_best = norm_r;
if (config->GetComm_Level() == COMM_FULL) x_best = x;
Comment thread
rois1995 marked this conversation as resolved.
p = ScalarType(0.0);
v = ScalarType(0.0);
r_0 = r;
Expand Down Expand Up @@ -1198,7 +1197,7 @@ unsigned long CSysSolve<ScalarType>::BCGSTAB_LinSolver(const CSysVector<ScalarTy
/*--- Check if solution has converged, else output the relative residual if necessary ---*/

norm_r = r.norm();
if (norm_r < norm_best) {
if ((i == 0) || (norm_r < norm_best)) {
norm_best = norm_r;
x_best = x;
}
Expand All @@ -1211,7 +1210,8 @@ unsigned long CSysSolve<ScalarType>::BCGSTAB_LinSolver(const CSysVector<ScalarTy
}
}

/*--- BCGSTAB does not reduce the residual monotonically, return the best iterate. ---*/
/*--- BCGSTAB does not reduce the residual monotonically, return the best iterate.
* The initial guess is not a candidate, returning it would mean no update at all. ---*/

if ((config->GetComm_Level() == COMM_FULL) && (norm_r > norm_best)) {
x = x_best;
Expand Down
2 changes: 1 addition & 1 deletion TestCases/parallel_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def main():
turbmod_sa_neg_rae2822.cfg_dir = "turbulence_models/sa/rae2822"
turbmod_sa_neg_rae2822.cfg_file = "turb_SA_NEG_RAE2822.cfg"
turbmod_sa_neg_rae2822.test_iter = 10
turbmod_sa_neg_rae2822.test_vals = [1.275994, 1.062588, -2.067822, 1.300662, 0.480881, 0.000000]
turbmod_sa_neg_rae2822.test_vals = [1.316535, 1.043996, 4.236921, 1.270979, 0.463385, 0.000000]
turbmod_sa_neg_rae2822.test_vals_aarch64 = [-1.345593, 1.448310, 1.208721, -0.846597, 1.248410, 0.489117, 0.000000]
test_list.append(turbmod_sa_neg_rae2822)

Expand Down
Loading