PHARE
PHARE copied to clipboard
boundary conditions from python3 to hdf5
https://github.com/PHAREHUB/PHARE/issues/165 https://github.com/PHAREHUB/PHARE/issues/166
Summary by CodeRabbit
-
New Features
- Added support for specifying boundary conditions for different simulation dimensions.
- Enhanced the diagnostic tools to include boundary condition information in output files.
-
Bug Fixes
- Corrected loop declaration syntax for improved code consistency.
- Improved handling of string data types in MPI utilities.
-
Documentation
- Updated documentation to reflect new methods and functionality related to boundary conditions.
-
Refactor
- Streamlined attribute writing in HDF5 files with new utility functions and error handling.
- Refactored diagnostic model to include boundary conditions as part of patch properties.
-
Tests
- Implemented new tests to verify the correct setting and output of boundary conditions in diagnostics.
Walkthrough
Walkthrough
The recent changes in the pyphare
codebase focus on enhancing boundary conditions and attribute management. The updates include configuring boundary types based on simulation dimensions in pharein
, initializing boundary conditions in the Hierarchy
class, handling std::string
data types in mpi_utils
, improving attribute management in h5writer
classes, and adding support for std::vector<std::string>
for boundary conditions in diagnostics, with corresponding testing.
Changes
File Path | Change Summary |
---|---|
pyphare/pyphare/pharein/__init__.py |
Added conditional string declarations for grid boundary types based on simulation dimensions. |
src/amr/wrappers/hierarchy.hpp src/diagnostic/diagnostic_model_view.hpp |
Added member functions for boundary conditions; updated constructor for Hierarchy . |
src/core/data/grid/gridlayout.hpp |
Minor syntax change in loop declaration. |
src/core/utilities/mpi_utils.hpp |
Added handling for std::string data type. |
src/diagnostic/detail/h5typewriter.hpp src/diagnostic/detail/h5writer.hpp src/hdf5/detail/h5/h5_file.hpp |
Enhanced attribute handling with new methods and error checking; modified existing methods to handle global attributes. |
tests/diagnostic/test_diagnostics.hpp |
Added testing for new std::vector<std::string> boundary condition attributes. |
[!WARNING]
.coderabbit.yaml
is using a deprecated configuration schemaThe configuration schema (version 1) is deprecated and will be removed on 19th May 2024. Please migrate to the latest schema version.
New Configuration YAML
early_access: false language: en tone_instructions: '' knowledge_base: learnings: scope: auto issues: scope: auto jira: project_keys: [] linear: team_keys: [] chat: auto_reply: true reviews: profile: chill request_changes_workflow: false high_level_summary: true high_level_summary_placeholder: '@coderabbitai summary' poem: false review_status: true collapse_walkthrough: true path_filters: [] path_instructions: - path: '**.hpp' instructions: >- Review the C++ code, point out issues relative to principles of clean code, expressiveness, and performance. tools: shellcheck: enabled: true ruff: enabled: true markdownlint: enabled: true github-checks: enabled: true timeout_ms: 90000 languagetool: enabled: true disabled_categories: - TYPOS - TYPOGRAPHY - CASING enabled_only: false level: default auto_review: enabled: true ignore_title_keywords: - WIP labels: [] drafts: true base_branches: - master
Configuration Instructions
- Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>.
-
Generate unit testing code for this file.
-
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitai
in a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file.
-
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitai
in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai generate interesting stats about this repository and render them as a table.
-
@coderabbitai show all the console.log statements in this repository.
-
@coderabbitai read src/utils.ts and generate unit testing code.
-
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
-
@coderabbitai pause
to pause the reviews on a PR. -
@coderabbitai resume
to resume the paused reviews. -
@coderabbitai review
to trigger a review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai resolve
resolve all the CodeRabbit review comments. -
@coderabbitai help
to get help.
Additionally, you can add @coderabbitai ignore
anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml
)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yaml
file to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
I figured it was a safe assumption that there wouldn't be different boundary conditions per level / model or solver type
caution about globals attributes considered in this PR that may be per rank from python