[Ramsed][AMR] Refinement utilities [1/4]#1641
[Ramsed][AMR] Refinement utilities [1/4]#1641Akos299 wants to merge 6 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
|
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: |
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 initiates a refactoring effort for the Adaptive Mesh Refinement (AMR) system, specifically focusing on the 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
This pull request refactors the AMR refinement handling by separating the generation of refinement flags from the enforcement of the 2:1 rule. My review identifies a critical out-of-bounds access bug, significant code duplication, and some inconsistencies in naming and documentation. I have provided suggestions to fix the critical issue and improve the overall code quality and maintainability.
src/shammodels/ramses/include/shammodels/ramses/modules/AMRGridRefinementHandler.hpp
Outdated
Show resolved
Hide resolved
|
It is expected that the sod_tube_godunov_amr.py failed because the buffer for amr-level is not already initialize. |
tdavidcl
left a comment
There was a problem hiding this comment.
Since you are replacing the OptIndexList by a buffer, it might as well NOT be a sycl::buffer. Also looking at the complexity of the change i'm down to migrate the Refinment to solvergraph before merge the 2:1 balance. What do you think ?
Lastly, the 2:1 balance should be optional.
src/shammodels/ramses/include/shammodels/ramses/modules/AMRGridRefinementHandler.hpp
Outdated
Show resolved
Hide resolved
Workflow reportworkflow report corresponding to commit 83fd038 Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Clang-tidy diff reportDoxygen diff with
|
This PR refactors RefinementHandler.hpp by