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 reset_internal_energy to C++ and simplify the algorithm #817

Merged
merged 5 commits into from
Mar 15, 2020

Conversation

maximumcats
Copy link
Member

PR summary

We now simply evaluate the eint corresponding to small_temp, and reset eint (and eden) as needed to be at least that large. We then apply the dual energy criterion. This makes the behavior corresponding to allow_small_energy == 0 the default, and removes that parameter.

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

We now simply evaluate the eint corresponding to small_temp, and
reset eint (and eden) as needed to be at least that large. We then
apply the dual energy criterion. This makes the behavior corresponding
to allow_small_energy == 0 the default, and removes that parameter.
@maximumcats
Copy link
Member Author

This addresses part of #702 but not all of it (reset_internal_energy is still a discrete routine).

@zingale
Copy link
Member

zingale commented Mar 14, 2020

Note: this seems to dramatically help the Sod stellar problem (Sod_stellar-test1-2d):

development:
Sod_stellar-test1-2d-development

this PR:
Sod_stellar-test1-2d-reset_internal_energy

@maximumcats
Copy link
Member Author

I had missed that SDC called ca_reset_internal_e directly. So I moved the actual implementation to a separate interface that takes a box and an Array4, and then implemented both the MultiFab interface and that call from SDC with it. Please retest.

@AMReX-Astro AMReX-Astro deleted a comment from zingale Mar 15, 2020
@zingale
Copy link
Member

zingale commented Mar 15, 2020

@zingale zingale merged commit fafa170 into development Mar 15, 2020
@zingale zingale deleted the reset_internal_energy branch March 15, 2020 15:58
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