-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add an AMR refinement criterion useful for testing #4691
Conversation
src/ParallelAlgorithms/Amr/Criteria/DriveToTargetAndOscillate.hpp
Outdated
Show resolved
Hide resolved
5192648
to
8d60744
Compare
struct TargetResolution { | ||
using type = std::array<size_t, Dim>; | ||
static constexpr Options::String help = { | ||
"The target resolution in each dimension."}; |
There was a problem hiding this comment.
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.
tests/Unit/ParallelAlgorithms/Amr/Criteria/Test_DriveToTarget.cpp
Outdated
Show resolved
Hide resolved
pushed a fixup |
This is useful for testing AMR actions.
c518a1b
to
82231c2
Compare
squashed |
Why is auto-merge not enabled? The label says it should've been... |
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. |
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
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments