Refactor AmrMesh::MakeNewGrids#5269
Draft
WeiqunZhang wants to merge 2 commits intoAMReX-Codes:developmentfrom
Draft
Refactor AmrMesh::MakeNewGrids#5269WeiqunZhang wants to merge 2 commits intoAMReX-Codes:developmentfrom
WeiqunZhang wants to merge 2 commits intoAMReX-Codes:developmentfrom
Conversation
Member
Author
asalmgren
approved these changes
Apr 5, 2026
The refactor addresses two issues. First, there was a bug when projecting grids during regrid. TagBoxArray might not have enough ghost cells to guarantee proper nesting when the new fine level grows by a lot. Second, it could be very inefficient to use the previous approach of adding extra ghost cells to TagBoxArray for proper nesting. In some users' cases, it may need more than 30 ghost cells. In the new approach, instead of using extra ghost cells, we explicitly add the projected tags outside the TagBoxArray's domain.
Member
Author
|
@desjardi I have convinced myself this is the right fix. The other PR also works, but at a greater cost of using too many ghost cells. Could you give this a test? Thanks! |
Member
Author
|
@zingale @BenWibking Could you fire up your regression tests? Thanks! 🙏 |
5 tasks
Member
Author
|
/run-hpsf-gitlab-ci |
|
GitLab CI has started at https://gitlab.spack.io/amrex/amrex/-/pipelines/1509292. |
|
GitLab CI 1509292 finished with status: failed. See details at https://gitlab.spack.io/amrex/amrex/-/pipelines/1509292. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The refactor addresses two issues.
First, there was a bug when projecting grids during regrid. TagBoxArray might not have enough ghost cells to guarantee proper nesting when the new fine level grows by a lot.
Second, it could be very inefficient to use the previous approach of adding extra ghost cells to TagBoxArray for proper nesting. In some users' cases, it may need more than 30 ghost cells.
In the new approach, instead of using extra ghost cells, we explicitly add the projected tags outside the TagBoxArray's domain.