[SPH] Add a perfectly load balanced particle setup#1384
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new, more sophisticated particle setup implementation (apply_setup_new) designed for better load balancing, especially in large-scale simulations. This new method provides fine-grained control over particle generation and communication, and includes an option for detailed logging of the setup process.
To demonstrate this new functionality, a comprehensive example script (run_sphsetup_logs.py) has been added. This script not only shows how to use the new setup function but also includes utilities for visualizing the setup logs, which is a great addition for debugging and analysis.
My review focuses on improving the new example script's robustness and maintainability, and addressing some potential issues in the C++ implementation. Key feedback includes:
- Using standard library constants and functions for better precision and portability in the Python example.
- Correcting a misleading warning in the Python bindings.
- Improving code quality in the C++ implementation by removing a hardcoded filename and suggesting a refactor of a very large function.
- A request for clarification on a magic number change in a benchmark file.
All original comments have been retained as none contradicted the provided rules, and no modifications were necessary based on the specified guidelines.
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>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Workflow reportworkflow report corresponding to commit 2760f3e Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Clang-tidy diff reportNo relevant changes found. You should now go back to your normal life and enjoy a hopefully sunny day while waiting for the review. Doxygen diff with
|
No description provided.