diff --git a/Src/LinearSolvers/MLMG/AMReX_MLEBNodeFDLaplacian.cpp b/Src/LinearSolvers/MLMG/AMReX_MLEBNodeFDLaplacian.cpp index 523ed4cb44d..ad0fc6f1200 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLEBNodeFDLaplacian.cpp +++ b/Src/LinearSolvers/MLMG/AMReX_MLEBNodeFDLaplacian.cpp @@ -284,20 +284,7 @@ MLEBNodeFDLaplacian::prepareForSolve () }); } - if (m_is_bottom_singular) - { - int amrlev = 0; - int mglev = 0; - auto const& dotmasks = m_coarse_dot_mask.arrays(); - auto const& dirmasks = m_dirichlet_mask[amrlev][mglev]->const_arrays(); - amrex::ParallelFor(m_coarse_dot_mask, - [=] AMREX_GPU_DEVICE (int box_no, int i, int j, int k) noexcept - { - if (dirmasks[box_no](i,j,k)) { - dotmasks[box_no](i,j,k) = Real(0.); - } - }); - } + AMREX_ASSERT(!isBottomSingular()); Gpu::streamSynchronize(); diff --git a/Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_sten.cpp b/Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_sten.cpp index 602f893b00d..db83ee8c979 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_sten.cpp +++ b/Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_sten.cpp @@ -344,7 +344,7 @@ MLNodeLaplacian::buildStencil () }); } - if (m_is_bottom_singular) + if (isBottomSingular()) { int amrlev = 0; int mglev = 0; diff --git a/Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.H b/Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.H index 424d22f60c3..89ee258a3aa 100644 --- a/Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.H +++ b/Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.H @@ -156,7 +156,6 @@ protected: CoarseningStrategy m_coarsening_strategy = CoarseningStrategy::Sigma; #endif - bool m_is_bottom_singular = false; bool m_masks_built = false; bool m_overset_dirichlet_mask = false; #ifdef AMREX_USE_GPU @@ -165,6 +164,9 @@ protected: int m_smooth_num_sweeps = 2; #endif mutable bool m_in_solution_mode = true; + +private: + bool m_is_bottom_singular = false; }; }