Skip to content

Commit

Permalink
Use MLLinOpT::make instead of MF constructor in solve_bicgstab
Browse files Browse the repository at this point in the history
  • Loading branch information
eebasso committed Nov 8, 2023
1 parent d364631 commit d1a471d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Src/LinearSolvers/MLMG/AMReX_MLCGSolver.H
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ MLCGSolverT<MF>::solve_bicgstab (MF& sol, const MF& rhs, RT eps_rel, RT eps_abs)
const DistributionMapping& dm = sol.DistributionMap();
const auto& factory = sol.Factory();

MF ph(ba, dm, ncomp, sol.nGrowVect(), MFInfo(), factory);
MF sh(ba, dm, ncomp, sol.nGrowVect(), MFInfo(), factory);
MF ph = Lp.make(amrlev, mglev, sol.nGrowVect());
MF sh = Lp.make(amrlev, mglev, sol.nGrowVect());
ph.setVal(RT(0.0));
sh.setVal(RT(0.0));

MF sorig(ba, dm, ncomp, nghost, MFInfo(), factory);
MF p (ba, dm, ncomp, nghost, MFInfo(), factory);
MF r (ba, dm, ncomp, nghost, MFInfo(), factory);
MF s (ba, dm, ncomp, nghost, MFInfo(), factory);
MF rh (ba, dm, ncomp, nghost, MFInfo(), factory);
MF v (ba, dm, ncomp, nghost, MFInfo(), factory);
MF t (ba, dm, ncomp, nghost, MFInfo(), factory);
MF sorig = Lp.make(amrlev, mglev, nghost);
MF p = Lp.make(amrlev, mglev, nghost);
MF r = Lp.make(amrlev, mglev, nghost);
MF s = Lp.make(amrlev, mglev, nghost);
MF rh = Lp.make(amrlev, mglev, nghost);
MF v = Lp.make(amrlev, mglev, nghost);
MF t = Lp.make(amrlev, mglev, nghost);

Lp.correctionResidual(amrlev, mglev, r, sol, rhs, MLLinOpT<MF>::BCMode::Homogeneous);

Expand Down

0 comments on commit d1a471d

Please sign in to comment.