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

Fix a pathological case for 2d EB #2840

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

WeiqunZhang
Copy link
Member

What could happen is a cell might be cut a tiny bit at a corner such that 3
faces with an area fraction of one and one face with an area fraction of
almost one, and the volume fraction is one. In that case, the boundary area
and centroid have been set to wrong values based on an incorrect assumption.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

What could happen is a cell might be cut a tiny bit at a corner such that 3
faces with an area fraction of one and one face with an area fraction of
almost one, and the volume fraction is one.  In that case, the boundary area
and centroid have been set to wrong values based on an incorrect assumption.
@WeiqunZhang WeiqunZhang merged commit 6f72de2 into AMReX-Codes:development Jun 15, 2022
@WeiqunZhang WeiqunZhang deleted the fix_2d_eb_barea branch June 15, 2022 16:37
@ax3l
Copy link
Member

ax3l commented Jun 16, 2022

For the 1.e-15 and 1.e-30 values in this file, you might want to consider using <limits>: std::numeric_limits<amrex::Real>::epsilon?

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