[Ramses][AMR] Refinement utilities [2/4]#1650
[Ramses][AMR] Refinement utilities [2/4]#1650Akos299 wants to merge 8 commits intoShamrock-code:mainfrom
Conversation
This commit moves the geometrical validity checks for block coarsening into a separate module, which will be introduced in a forthcoming commit. As a result, gen_refine_block_changes is now responsible only for computing refinement and derefinement flags based on the user-defined refinement criteria.
This commit adds a function to check and enforce the 2:1 refinement rule. In the current implementation, kernels are launched over all blocks rather than only over blocks flagged for refinement. This is because only face neighbors (in the 6 Cartesian directions) are currently available, whereas enforcing the 2:1 rule also requires information about edge and corner neighbors. For robustness, the procedure is iterated three times to ensure convergence. A more efficient level-by-level implementation will be introduced in a future update.
…the modifications
This commit introduces a function that checks whether blocks flagged for derefinement can actually be coarsened. After this validation step, only one block per sibling group is retained to perform the derefinement. Note that this implementation does not yet enforce the 2:1 refinement rule for derefinement. Support for the 2:1 rule will be added in a future update.
Summary of ChangesHello @Akos299, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly advances the Adaptive Mesh Refinement (AMR) capabilities by introducing robust mechanisms to manage grid changes. It focuses on ensuring the structural integrity of the mesh during refinement and derefinement operations, specifically by enforcing the 2:1 refinement ratio and validating the geometrical feasibility of block merging. These enhancements lay the groundwork for more reliable and efficient AMR simulations. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request introduces new functionalities for AMR grid refinement and derefinement, including enforcing the 2:1 rule and geometrical validity checks. It also updates the gen_refine_block_changes function to use sycl::buffer<u32> for flags instead of OptIndexList. The changes are well-structured and address the requirements outlined in the PR description. The identified areas for improvement regarding the handling of std::move for DistributedData and the commented-out derefinement call remain relevant.
src/shammodels/ramses/include/shammodels/ramses/modules/AMRGridRefinementHandler.hpp
Outdated
Show resolved
Hide resolved
src/shammodels/ramses/include/shammodels/ramses/modules/AMRGridRefinementHandler.hpp
Outdated
Show resolved
Hide resolved
|
Thanks @Akos299 for opening this PR! You can do multiple things directly here: Once the workflow completes a message will appear displaying informations related to the run. Also the PR gets automatically reviewed by gemini, you can: |
Workflow reportworkflow report corresponding to commit b7c2987 Light CI is enabled. This will only run the basic tests and not the full tests. Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Doxygen diff with
|
As a continuation of PR #1641, this PR introduces: