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

Allow random hp AMR for testing #5781

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

nilsvu
Copy link
Member

@nilsvu nilsvu commented Feb 16, 2024

Support triggering any of the AMR flags with a specified probability, rather than only h-refinement. Simplifies the reasoning of the AMR criterion and gives more control over the types of refinement. Still enforces a maximum refinement level, which can be deleted once it's enforced globally with an AMR policy.

Proposed changes

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

@nilsvu nilsvu requested a review from kidder February 16, 2024 19:24
@nilsvu nilsvu marked this pull request as ready for review February 16, 2024 22:14
@nilsvu nilsvu force-pushed the random_amr branch 2 times, most recently from d105fa9 to 3f207ea Compare February 17, 2024 00:02
@nilsvu nilsvu mentioned this pull request Feb 17, 2024
3 tasks
Copy link
Member

@kidder kidder left a comment

Choose a reason for hiding this comment

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

you can squash your changes

static double upper_bound() { return 1.0; }
"Possible refinement types and their probability, specified as integer "
"weights. For example, set 'Split: 1' and 'DoNothing: 4' to split each "
"element with 25% probability. The refinement is evaluated in each "
Copy link
Member

Choose a reason for hiding this comment

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

25 -> 20 (total weight is 5) (or change 4 -> 3 for DoNothing)

* \note This criterion is primarily useful for testing the mechanics of
* h-refinement
* You can specify a probability for each possible `amr::Flag`. It is evaluated
* in each dimension separately.
Copy link
Member

Choose a reason for hiding this comment

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

mention here (or the option help) that:

  • probability for a flag is its weight over sum of weights
  • you do not need to specify flags with weight 0
  • if all weights are 0, DoNothing is always chosen

Support triggering any of the AMR flags with a specified probability, rather than
only h-refinement. Simplifies the reasoning of the AMR criterion
and gives more control over the types of refinement.
Still enforces a maximum refinement level, which can be
deleted once it's enforced globally with an AMR policy.
@nilsvu
Copy link
Member Author

nilsvu commented Feb 21, 2024

Done, thanks for reviewing.

@nilsvu nilsvu merged commit 766d26e into sxs-collaboration:develop Feb 22, 2024
21 of 22 checks passed
@nilsvu nilsvu deleted the random_amr branch February 22, 2024 22:38
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.

2 participants