Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move use of bcrec back onto GPU #3494

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions Src/EB/AMReX_EB_StateRedistribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,6 @@ MLStateRedistribute ( Box const& bx, int ncomp,

for (int n = 0; n < ncomp; n++)
{
bool extdir_ilo = (d_bcrec_ptr[n].lo(0) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].lo(0) == amrex::BCType::hoextrap);
bool extdir_ihi = (d_bcrec_ptr[n].hi(0) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].hi(0) == amrex::BCType::hoextrap);
bool extdir_jlo = (d_bcrec_ptr[n].lo(1) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].lo(1) == amrex::BCType::hoextrap);
bool extdir_jhi = (d_bcrec_ptr[n].hi(1) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].hi(1) == amrex::BCType::hoextrap);
#if (AMREX_SPACEDIM == 3)
bool extdir_klo = (d_bcrec_ptr[n].lo(2) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].lo(2) == amrex::BCType::hoextrap);
bool extdir_khi = (d_bcrec_ptr[n].hi(2) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].hi(2) == amrex::BCType::hoextrap);
#endif

//
// ****************************************************************************************
//

// Define Qhat (from Berger and Guliani)
// Here we initialize Qhat to equal U_in on all cells in bxg3 so that
Expand Down Expand Up @@ -233,9 +215,23 @@ MLStateRedistribute ( Box const& bx, int ncomp,
#if (AMREX_SPACEDIM == 3)
if ( (z_max-z_min) < slope_stencil_min_width ) { nz = 2; }
#endif
bool extdir_ilo = (d_bcrec_ptr[n].lo(0) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].lo(0) == amrex::BCType::hoextrap);
bool extdir_ihi = (d_bcrec_ptr[n].hi(0) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].hi(0) == amrex::BCType::hoextrap);
bool extdir_jlo = (d_bcrec_ptr[n].lo(1) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].lo(1) == amrex::BCType::hoextrap);
bool extdir_jhi = (d_bcrec_ptr[n].hi(1) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].hi(1) == amrex::BCType::hoextrap);
#if (AMREX_SPACEDIM == 3)
bool extdir_klo = (d_bcrec_ptr[n].lo(2) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].lo(2) == amrex::BCType::hoextrap);
bool extdir_khi = (d_bcrec_ptr[n].hi(2) == amrex::BCType::ext_dir ||
d_bcrec_ptr[n].hi(2) == amrex::BCType::hoextrap);
#endif

// Compute slopes of Qhat (which is the sum of the qt's) then use
// that for each qt separately

amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> slopes_eb;
if (nx*ny*nz == 1) {
// Compute slope using 3x3x3 stencil
Expand Down
Loading