Skip to content

Commit

Permalink
Merge branch 'development' into bicgstab
Browse files Browse the repository at this point in the history
  • Loading branch information
eebasso authored Oct 19, 2023
2 parents 7961129 + 7ee2912 commit 4d1a6f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
15 changes: 1 addition & 14 deletions Src/LinearSolvers/MLMG/AMReX_MLEBNodeFDLaplacian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_sten.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ MLNodeLaplacian::buildStencil ()
});
}

if (m_is_bottom_singular)
if (isBottomSingular())
{
int amrlev = 0;
int mglev = 0;
Expand Down
4 changes: 3 additions & 1 deletion Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.H
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
};

}
Expand Down

0 comments on commit 4d1a6f0

Please sign in to comment.