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

EB 2D: Fix levelset on nodes adjacent to covered edges #3370

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

WeiqunZhang
Copy link
Member

Summary

This fixes inconsistency in 2D EB data. When an edge is covered, its edge length is set to zero. If the level set value on its nodes is not set to less than zero, the EB solver LEBNodeFDLaplacian will treat them as normal nodes and that will cause floating point issues.

Note that we have already been doing this kind of fix in 3D.

Additional background

This issue was reported by @RemiLehe.

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

This fixes inconsistency in 2D EB data. When an edge is covered, its edge
length is set to zero. If the level set value on its nodes is not set to
less than zero, the EB solver LEBNodeFDLaplacian will treat them as normal
nodes and that will cause floating point issues.

Note that we have already been doing this kind of fix in 3D.
@WeiqunZhang WeiqunZhang requested review from ax3l and atmyers June 15, 2023 17:48
@RemiLehe
Copy link
Contributor

Thanks a lot for this PR!
It did fix the issue that I was seeing.

@WeiqunZhang WeiqunZhang marked this pull request as ready for review June 15, 2023 22:58
@WeiqunZhang WeiqunZhang merged commit 02ac1f3 into AMReX-Codes:development Jun 15, 2023
@WeiqunZhang WeiqunZhang deleted the fix_2d_eb_levset branch June 15, 2023 22: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.

3 participants