Skip to content

Commit

Permalink
Cast alpha, beta and pw as const
Browse files Browse the repository at this point in the history
  • Loading branch information
eebasso committed Dec 6, 2023
1 parent 1096adb commit 1ac8ca4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/LinearSolvers/MLMG/AMReX_MLCGSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,17 @@ MLCGSolverT<MF>::solve_cg (MF& sol, const MF& rhs, RT eps_rel, RT eps_abs)
}
else
{
RT beta = rho/rho_1;
const RT beta = rho/rho_1;
MF::Xpay(p, beta, r, 0, 0, ncomp, nghost); // p = r + beta * p
}
Lp.apply(amrlev, mglev, q, p, MLLinOpT<MF>::BCMode::Homogeneous, MLLinOpT<MF>::StateMode::Correction);

RT pw = dotxy(p,q);
const RT pw = dotxy(p,q);
if ( pw == RT(0.0))
{
ret = 1; break;
}
RT alpha = rho/pw;
const RT alpha = rho/pw;

if ( verbose > 2 )
{
Expand Down

0 comments on commit 1ac8ca4

Please sign in to comment.