Skip to content

Reduce order at user BCs for Godunov#673

Merged
baperry2 merged 10 commits intoAMReX-Combustion:developmentfrom
baperry2:userbc-godunov
Aug 16, 2023
Merged

Reduce order at user BCs for Godunov#673
baperry2 merged 10 commits intoAMReX-Combustion:developmentfrom
baperry2:userbc-godunov

Conversation

@baperry2
Copy link
Copy Markdown
Contributor

@baperry2 baperry2 commented Aug 2, 2023

In bcnormal, users specify boundaries at step N, but the Godunov fluxes are computed at N+1/2. That leads to an inconsistency. This PR addresses that by computing fluxes for any boundary specified through bcnormal using the data only at step N, with face data always obtained with PLM at these boundaries. This does not affect other types of boundaries.

@baperry2 baperry2 requested a review from marchdf August 2, 2023 21:49
// because the user specifies conditions at N
// bcnormal used for "Hard" (Inflow=1) and "UserBC" (6)
for (int idir = 0; idir < 3; idir++) {
if (bclo[idir] == Inflow || bclo[idir] == 6) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of 6, I think we have a variable to check that? Or maybe we dont...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added an enum for this.

yflxbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
pc_cmpflx(
i, j, k, bcly, bchy, dly, dhy, qymarr, qyparr, fyarr, q2, qaux, cdir);
i, j, k, bcly, bchy, dly, dhy, qymarr, qyparr, fyarr, gdtemp, qaux,
Copy link
Copy Markdown
Contributor

@marchdf marchdf Aug 3, 2023

Choose a reason for hiding this comment

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

did you mean to switch from q2 to gdtemp?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, although I will have to double check because I'm seeing unexpected errors. But in 3D all the equivalent calls put this into a temporary fab because it shouldn't be needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Turns out that was the issue, good catch

@baperry2 baperry2 enabled auto-merge (squash) August 16, 2023 04:44
@baperry2 baperry2 requested a review from marchdf August 16, 2023 04:44
@baperry2
Copy link
Copy Markdown
Contributor Author

@jrood-nrel can you take a look at the test that's failing? I haven't seen something fail there before.

@jrood-nrel
Copy link
Copy Markdown
Contributor

jrood-nrel commented Aug 16, 2023

I think the Github virtual environments may have been updated. It looks like we mostly have the option that would fix this, which is -flto=auto in the compiler lines, but we don't have it everywhere necessary. We can safely suppress it, which I did in #676 .

@baperry2 baperry2 merged commit b84da2f into AMReX-Combustion:development Aug 16, 2023
@baperry2 baperry2 deleted the userbc-godunov branch August 17, 2023 00:29
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.

3 participants