Skip to content

[Ramses] use solvergraph module to fuse ghost zones internally#1196

Merged
tdavidcl merged 4 commits intoShamrock-code:mainfrom
tdavidcl:ramses-fuse-gz
Aug 20, 2025
Merged

[Ramses] use solvergraph module to fuse ghost zones internally#1196
tdavidcl merged 4 commits intoShamrock-code:mainfrom
tdavidcl:ramses-fuse-gz

Conversation

@tdavidcl
Copy link
Member

No description provided.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @tdavidcl, 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 refactors the internal handling of ghost zones within the Ramses project by leveraging the solvergraph module. It introduces a new FuseGhostLayer component that encapsulates the logic for merging ghost zone data, replacing previous manual implementations. This change aims to improve modularity and integrate the ghost zone fusion process more seamlessly into the existing graph-based computational framework.

Highlights

  • New FuseGhostLayer Module: A new C++ class, FuseGhostLayer, has been introduced. It extends shamrock::solvergraph::INode and is specifically designed to handle the fusion of ghost zone data within the solver graph framework.
  • Integration into GhostZones Module: The existing GhostZones module has been updated to utilize the newly created FuseGhostLayer node. This integration replaces the previous manual merging of ghost zone data, streamlining the process within the solver graph architecture.
  • Refactoring of Data Merging Logic: The manual iteration and insertion of ghost layer elements into patch data layers have been refactored. The new FuseGhostLayer node now encapsulates this logic, leading to a cleaner and more modular data merging process.
  • New Data Extraction Utility: A new utility method, extract_patchdatas(), has been added to PatchDataLayerEdge.hpp. This method facilitates the efficient transfer and clearing of patch data, which is crucial for optimizing data flow within the new graph-based processing.
Using Gemini Code Assist

The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the ghost zone fusion logic by introducing a new FuseGhostLayer solver graph node. This is a good improvement, as it encapsulates the fusion logic into a dedicated, reusable component, making the GhostZones.cpp file cleaner and more focused on orchestration. The new node and its integration appear correct. I have a few minor suggestions for the new files to improve documentation and code quality.

});
}

std::string shammodels::basegodunov::modules::FuseGhostLayer::_impl_get_tex() { return "TODO"; }
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The _impl_get_tex() method returns a "TODO" placeholder. This should be implemented to provide a meaningful TeX representation for this node, which is likely used for visualization or documentation purposes. If implementing this is out of scope for this PR, please create a follow-up issue and reference it in a comment.

tdavidcl and others added 3 commits August 20, 2025 10:08
…ostLayer.hpp

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@tdavidcl tdavidcl merged commit 706f5f7 into Shamrock-code:main Aug 20, 2025
47 checks passed
@tdavidcl tdavidcl deleted the ramses-fuse-gz branch August 20, 2025 10:54
@github-actions
Copy link
Contributor

Workflow report

workflow report corresponding to commit dbcfbc1
Commiter email is timothee.davidcleris@proton.me
GitHub page artifact URL GitHub page artifact link (can expire)

Pre-commit check report

Pre-commit check: ✅

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check for merge conflicts................................................Passed
check that executables have shebangs.....................................Passed
check that scripts with shebangs are executable..........................Passed
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check for broken symlinks................................................Passed
check yaml...............................................................Passed
detect private key.......................................................Passed
No-tabs checker..........................................................Passed
Tabs remover.............................................................Passed
Validate GitHub Workflows................................................Passed
clang-format.............................................................Passed
black....................................................................Passed
ruff check...............................................................Passed
Check doxygen headers....................................................Passed
Check license headers....................................................Passed
Check #pragma once.......................................................Passed
Check SYCL #include......................................................Passed
No ssh in git submodules remote..........................................Passed

Test pipeline can run.

Clang-tidy diff report

No relevant changes found.
Well done!

You should now go back to your normal life and enjoy a hopefully sunny day while waiting for the review.

Doxygen diff with main

Removed warnings : 6
New warnings : 38
Warnings count : 7450 → 7482 (0.4%)

Detailed changes :
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:24: warning: Compound shammodels::basegodunov::modules::FuseGhostLayer is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:29: warning: Compound shammodels::basegodunov::modules::FuseGhostLayer::Edges is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:31: warning: Member ghost_layer (variable) of struct shammodels::basegodunov::modules::FuseGhostLayer::Edges is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:33: warning: Member patch_data_layers (variable) of struct shammodels::basegodunov::modules::FuseGhostLayer::Edges is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:36: warning: Member set_edges(std::shared_ptr< shamrock::solvergraph::PatchDataLayerDDShared > ghost_layer, std::shared_ptr< shamrock::solvergraph::IPatchDataLayerRefs > patch_data_layers) (function) of class shammodels::basegodunov::modules::FuseGhostLayer is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:43: warning: Member get_edges() (function) of class shammodels::basegodunov::modules::FuseGhostLayer is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:50: warning: Member _impl_evaluate_internal() (function) of class shammodels::basegodunov::modules::FuseGhostLayer is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:52: warning: Member _impl_get_label() (function) of class shammodels::basegodunov::modules::FuseGhostLayer is not documented.
+ src/shammodels/ramses/include/shammodels/ramses/modules/FuseGhostLayer.hpp:54: warning: Member _impl_get_tex() (function) of class shammodels::basegodunov::modules::FuseGhostLayer is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:35: warning: Member getptr_shared() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:36: warning: Member getptr_weak() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:38: warning: Member get_ro_edges() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:39: warning: Member get_rw_edges() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:41: warning: Member __internal_set_ro_edges(std::vector< std::shared_ptr< IDataEdge > > new_ro_edges) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:42: warning: Member __internal_set_rw_edges(std::vector< std::shared_ptr< IDataEdge > > new_rw_edges) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:45: warning: Member on_edge_ro_edges(Func &&f) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:48: warning: Member on_edge_rw_edges(Func &&f) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:56: warning: Member get_ro_edge(int slot) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:61: warning: Member get_rw_edge(int slot) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:65: warning: Member get_ro_edge_base(int slot) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:69: warning: Member get_rw_edge_base(int slot) (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:73: warning: Member evaluate() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:75: warning: Member get_dot_graph() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:76: warning: Member get_dot_graph_partial() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:77: warning: Member get_dot_graph_node_start() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:78: warning: Member get_dot_graph_node_end() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:80: warning: Member get_tex() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:81: warning: Member get_tex_partial() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:88: warning: Member _impl_get_dot_graph_partial() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:89: warning: Member _impl_get_dot_graph_node_start() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/INode.hpp:90: warning: Member _impl_get_dot_graph_node_end() (function) of class shamrock::solvergraph::INode is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:54: warning: Member extract_patchdatas() (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
- src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:54: warning: Member pdl() const (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
- src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:58: warning: Member get_layout_ptr() (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
- src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:60: warning: Member get(u64 id_patch) override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:60: warning: Member pdl() const (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
- src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:64: warning: Member get(u64 id_patch) const override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:64: warning: Member get_layout_ptr() (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:66: warning: Member get(u64 id_patch) override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
- src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:68: warning: Member get_refs() override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:70: warning: Member get(u64 id_patch) const override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
- src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:73: warning: Member get_const_refs() const override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:74: warning: Member get_refs() override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.
+ src/shamrock/include/shamrock/solvergraph/PatchDataLayerEdge.hpp:79: warning: Member get_const_refs() const override (function) of class shamrock::solvergraph::PatchDataLayerEdge is not documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant