diff --git a/Src/LinearSolvers/MLMG/AMReX_MLCGSolver.H b/Src/LinearSolvers/MLMG/AMReX_MLCGSolver.H index 3764fa38f8a..fce7b1d5005 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLCGSolver.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLCGSolver.H @@ -90,22 +90,18 @@ MLCGSolverT::solve_bicgstab (MF& sol, const MF& rhs, RT eps_rel, RT eps_abs) const int ncomp = sol.nComp(); - const BoxArray& ba = sol.boxArray(); - 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::BCMode::Homogeneous);