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 the fourth order center <-> average stuff to C++ #884

Merged
merged 11 commits into from
May 6, 2020

Conversation

zingale
Copy link
Member

@zingale zingale commented Apr 27, 2020

PR summary

PR checklist

  • test suite needs to be run on this PR
  • this PR will change answers in the test suite
  • all functions have docstrings as per the coding conventions
  • the CHANGES file has been updated
  • if appropriate, this change is described in the docs

@zingale zingale marked this pull request as ready for review April 27, 2020 16:31
@zingale
Copy link
Member Author

zingale commented Apr 27, 2020

@@ -289,23 +288,29 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update)

#if AMREX_SPACEDIM >= 2
// construct the face-center interface states q_fc
AMREX_PARALLEL_FOR_4D(nbx, NQ, i, j, k, n, {
bool test = (n == QGC) || (n == QTEMP);
const int* lo_bc = phys_bc.lo();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phys_bc is sized AMREX_SPACEDIM so we need to avoid dereferencing it outside those bounds. There are a few other instances of that below.

void make_cell_center(const Box& bx,
Array4<Real const> const& U,
Array4<Real> const& U_cc,
GpuArray<int, 3>& domlo, GpuArray<int, 3>& domhi);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domlo and domhi should be const in all of these routines

@zingale
Copy link
Member Author

zingale commented May 6, 2020

I think I addressed all the comments

@zingale zingale merged commit a85c95b into AMReX-Astro:development May 6, 2020
@zingale zingale deleted the cxx_fourth branch May 6, 2020 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants