MakeNewGrids: param to set number of grid iterations#4903
Merged
WeiqunZhang merged 2 commits intoAMReX-Codes:developmentfrom Jan 19, 2026
Merged
MakeNewGrids: param to set number of grid iterations#4903WeiqunZhang merged 2 commits intoAMReX-Codes:developmentfrom
WeiqunZhang merged 2 commits intoAMReX-Codes:developmentfrom
Conversation
5 tasks
Member
|
The approach in this PR may not be necessary. Could we simply change that hardwired 4 to a parameter that has a default value of 4. I think for location based tagging, it's sufficient to have the iteration number set to max_level. During each iteration a fine level can grow to its coarse level's domain. So with max_level iterations, it should be sufficient (again assuming tagging is location based and it does not change during the iteration). |
3eff55f to
fd1ca77
Compare
Contributor
Author
|
@WeiqunZhang Ok, I've changed the PR to just add a runtime parameter for the max number of iterations. We can set this equal to |
WeiqunZhang
approved these changes
Jan 19, 2026
BenWibking
added a commit
to quokka-astro/quokka
that referenced
this pull request
Jan 25, 2026
Sets a safe default for the number of iterations to perform when tagging and re-gridding AMR levels. See AMReX-Codes/amrex#4903.
5 tasks
github-merge-queue bot
pushed a commit
to quokka-astro/quokka
that referenced
this pull request
Jan 27, 2026
### Description Sets a safe default for the number of iterations to perform when tagging and re-gridding AMR levels. This is an example of why this is required: https://github.com/BenWibking/amrex-gridgen-test ### Related issues See AMReX-Codes/amrex#4903. ### Checklist _Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an `x` inside the square brackets `[ ]` in the Markdown source below:_ - [x] I have added a description (see above). - [x] I have added a link to any related issues (if applicable; see above). - [x] I have read the [Contributing Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md). - [ ] I have added tests for any new physics that this PR adds to the code. - [ ] *(For quokka-astro org members)* I have manually triggered the GPU tests with the magic comment `/azp run`. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.
Summary
This adds the ability to set the number of grid iterations in
MakeNewGrids. The default is 4, which was the previous hard-coded value.Additional background
For some problems, this is required for correct grid generation. This typically is only needed with deeply nested AMR hierarchies (8+ levels).
See https://github.com/BenWibking/amrex-gridgen-test for a reproducer of the original issue.
Checklist
The proposed changes: