Skip to content

Conversation

@geoffrey4444
Copy link
Contributor

@geoffrey4444 geoffrey4444 commented Jun 12, 2025

Proposed changes

Adds a base class and a simple example derived class for criteria for adjusting the resolution adaptively when finding an apparent horizon. A future PR will implement the actual criteria intended to be used in real binary-black-hole simulations. Another future PR (or set or PRs) will take care of implementing adaptivity in the apparent horizon finder.

The design and implementation are based on how adaptive mesh refinement criteria are implemented in spectre but enables the criteria to work with output of a horizon find (Strahlkorper and FastFlow::IterInfo) instead of an ElementId.

NOTE: I used Cursor generative AI (tab completion, review, fixing compiler errors) when preparing this PR. I examined all code suggestions, and to the best of my knowledge, this PR contains no code either copyrighted by someone else or used in violation of any code's license agreement. Please note in your review any concerns about this.

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

@geoffrey4444 geoffrey4444 requested a review from nilsvu June 12, 2025 17:32
@geoffrey4444
Copy link
Contributor Author

The clang-tidy failure did not come up when I ran the test locally, but I'll make the fix

@geoffrey4444 geoffrey4444 force-pushed the AdaptiveAHCriteria branch 2 times, most recently from f635d66 to d4a4fd3 Compare June 18, 2025 13:09
@geoffrey4444 geoffrey4444 requested a review from knelli2 June 23, 2025 13:12
Copy link
Contributor

@knelli2 knelli2 left a comment

Choose a reason for hiding this comment

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

Looks good! Please add a fixup commit for these changes, and also fix the small conflict.

Comment on lines 11 to 12
namespace ah::Criteria {
using standard_criteria = tmpl::list<IncreaseResolution>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to allow this as part of the "standard criteria"? This means it'll probably be available to users in the input file if this type alias is used in the metavars. I know this is what AMR does, but seems like this is just a testing criterion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm fine not including this in the standard criteria list. If users really want it for some reason we can always add it later

Copy link
Contributor

@knelli2 knelli2 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 everything

@knelli2
Copy link
Contributor

knelli2 commented Jul 9, 2025

Got approval from @nilsvu on slack that I can just merge this without his review in the interest of time. Also test failure is unrelated

@knelli2 knelli2 merged commit c14e4cc into sxs-collaboration:develop Jul 9, 2025
23 of 24 checks passed
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