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

Convert hbflx3 to C++ #2590

Merged
merged 12 commits into from
Oct 9, 2023
Merged

Convert hbflx3 to C++ #2590

merged 12 commits into from
Oct 9, 2023

Conversation

maxpkatz
Copy link
Member

@maxpkatz maxpkatz commented Oct 1, 2023

PR summary

PR checklist

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

@maxpkatz maxpkatz marked this pull request as ready for review October 1, 2023 20:30
@zingale
Copy link
Member

zingale commented Oct 2, 2023

@maxpkatz
Copy link
Member Author

maxpkatz commented Oct 2, 2023

tests: http://groot.astro.sunysb.edu/Castro/test-suite/gfortran/2023-10-01/index.html there are some FPEs

I had an indexing error which is now fixed, can you try again?

Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
Source/radiation/HABEC.H Outdated Show resolved Hide resolved
@maxpkatz
Copy link
Member Author

maxpkatz commented Oct 6, 2023

I've synchronized 3D with 1D and 2D. The 3D case was making some simplifying assumptions; the more general expression in 1D and 2D are now what we use, and they result in the 3D expression because r0 = 1 for 3D Cartesian.

@zingale
Copy link
Member

zingale commented Oct 7, 2023

bfm2 = 0.e0_rt;
}
else if (bct == LO_MARSHAK) {
bfv = 2.e0_rt * beta * r[i - reg_ilo];
Copy link
Member

Choose a reason for hiding this comment

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

this works as expected in 3D?

@maxpkatz
Copy link
Member Author

maxpkatz commented Oct 9, 2023

This PR now condenses all six faces of the grid into a single code block, and instead of using the vector of metric terms computed in a separate step, it now evaluates those metric terms inline.

@zingale
Copy link
Member

zingale commented Oct 9, 2023

@zingale zingale merged commit 40b9403 into AMReX-Astro:development Oct 9, 2023
18 checks passed
@maxpkatz maxpkatz deleted the cxx-hbflx3 branch October 9, 2023 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants