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

Add an AMR refinement criterion useful for testing #4691

Merged
merged 3 commits into from
Feb 6, 2023

Conversation

kidder
Copy link
Member

@kidder kidder commented Feb 3, 2023

Proposed changes

The new criterion drives each Element in the Domain to a target resolution and refinement level. Once it reaches the target, it will perform a given a decision that will cause the grid to oscillate between the target grid and a grid which differs by either one in resolution or refinement level.

This allows testing AMR actions in a controlled manner to make sure the mechanics of transferring data is correct.

In addition to testing, this criteria may be needed in order to drive the grid to desired initial refinement levels in order to bypass issues with Charm++

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

wthrowe
wthrowe previously approved these changes Feb 3, 2023
struct TargetResolution {
using type = std::array<size_t, Dim>;
static constexpr Options::String help = {
"The target resolution in each dimension."};
Copy link
Member

@nilsvu nilsvu Feb 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note here that "resolution" means number of grid points?

(Not for this PR) We've been a bit inconsistent throughout the code with this naming. Sometimes we use "number of grid points", sometimes it's "extents" (which isn't particularly clear because there's a notion of "size" attached to it), and in AMR it's "resolution" which also isn't super clear because h-refinement is also a notion of resolution. Nothing to resolve in this PR, but we should probably make this more consistent. I suggest "num points" because everyone understands what that means.

src/ParallelAlgorithms/Amr/Criteria/DriveToTarget.hpp Outdated Show resolved Hide resolved
@kidder
Copy link
Member Author

kidder commented Feb 4, 2023

pushed a fixup

nilsvu
nilsvu previously approved these changes Feb 4, 2023
@kidder
Copy link
Member Author

kidder commented Feb 4, 2023

squashed

@nilsvu nilsvu added the auto-merge GitHub's auto-merge has been enabled for this PR. label Feb 4, 2023
@nilsdeppe
Copy link
Member

Why is auto-merge not enabled? The label says it should've been...

@nilsdeppe nilsdeppe merged commit d183c0c into sxs-collaboration:develop Feb 6, 2023
@nilsvu
Copy link
Member

nilsvu commented Feb 6, 2023

I was going to wait at least one business day before merging. Enabling auto merge would have merged this directly. Hence the label, to remind myself to merge it next business day.

@kidder kidder deleted the amr_criteria_oscillate branch February 8, 2023 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge GitHub's auto-merge has been enabled for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants