Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some refactoring of messenger stuff and cleaning here and there #757

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

nicolasaunai
Copy link
Member

@nicolasaunai nicolasaunai commented Oct 18, 2023

Summary by CodeRabbit

  • New Feature: Introduced Refiner and Synchronizer classes to improve data communication and interpolation between different levels of a patch hierarchy, enhancing the software's performance and reliability.
  • Refactor: Simplified and cleaned up the Communicator class, improving code readability and maintainability.
  • Refactor: Updated HybridModel and SolverPPC classes to use core::VecFieldNames type, improving code consistency.
  • Test: Adjusted assertion tolerances in two test methods to improve test reliability.
  • Chore: Updated build configuration with the addition of refiner.hpp and synchronizer.hpp files.

These changes aim to enhance the software's performance, reliability, and maintainability, providing a more robust and user-friendly experience.

@coderabbitai
Copy link

coderabbitai bot commented Oct 18, 2023

Walkthrough

The changes primarily focus on refining the codebase for better clarity, consistency, and performance. Key modifications include the introduction of new classes (Refiner, Synchronizer), updates to existing classes (Communicator, HybridModel, SolverPPC), and adjustments to test tolerances. The changes also involve the use of new types (VecFieldNames), removal of unused code, and refactoring for improved maintainability.

Changes

File(s) Summary
src/amr/CMakeLists.txt Added refiner.hpp and synchronizer.hpp to the build configuration.
src/amr/messenger_registration.hpp Added a comment explaining the purpose of the MessengerRegistration class.
src/amr/messengers/communicator.hpp Refactored the Communicator class to use type traits and removed unused code.
src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp Introduced significant alterations including new classes, modified existing classes, and added new member functions and variables.
src/amr/messengers/hybrid_messenger_info.hpp Updated data structures in the HybridMessengerInfo class for improved clarity and consistency.
src/amr/messengers/refiner.hpp Introduced a new Refiner class for data communication and interpolation between different levels of a patch hierarchy.
src/amr/messengers/refiner_pool.hpp Updated the RefinerPool class with new functions and modifications for improved functionality and flexibility.
src/amr/messengers/synchronizer.hpp Introduced a new Synchronizer class derived from the Communicator class for data synchronization.
src/amr/messengers/synchronizer_pool.hpp Updated the SynchronizerPool class with changes related to the integration of the ResourcesManager.
src/amr/physical_models/hybrid_model.hpp Updated the fillMessengerInfo function in the HybridModel class with new member variables and types.
src/amr/solvers/solver_ppc.hpp Modified the fillMessengerInfo function in the SolverPPC class with updated types for the hybridInfo object.
src/amr/wrappers/hierarchy.hpp Removed the core/logger.hpp header and added the core/utilities/meta/meta_utilities.hpp header.
src/core/data/vecfield/vecfield.hpp Updated the VecField class and added the VecFieldNames struct.
src/phare_amr.hpp Updated include statements and type aliases in the "PHARE_Types" struct.
src/simulator/phare_types.hpp Modified the type alias Splitter in the PHARE_Types struct.
tests/simulator/test_advance.py Adjusted assertion tolerances in two test methods to improve test reliability.

"A codebase refined, a structure defined, 🐇
With every line, the logic aligned. 🧩
Tests are now stable, as much as we're able, 🧪
Celebrate this change, at the coding table! 🎉"


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.

CodeRabbit Commands

  • Enter @coderabbitai pause as a PR comment to pause the reviews on a PR.
  • Enter @coderabbitai resume as a PR comment to resume the paused reviews.
  • For on-demand reviews, enter @coderabbitai review as a PR comment to trigger a review. This is useful when reviews are automatic disabled at the repository level.
  • Enter @coderabbitai: ignore in the PR description to stop a specific PR from being reviewed.

Note these commands work only in the PR comment. For conversations with the bot, please use the review comments on code diffs or files.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 19

Commits Files that changed from the base of the PR and between 69da453 and 19a68f4.
Files selected for processing (15)
  • src/amr/CMakeLists.txt (1 hunks)
  • src/amr/messenger_registration.hpp (2 hunks)
  • src/amr/messengers/communicator.hpp (4 hunks)
  • src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (30 hunks)
  • src/amr/messengers/hybrid_messenger_info.hpp (2 hunks)
  • src/amr/messengers/refiner.hpp (1 hunks)
  • src/amr/messengers/refiner_pool.hpp (1 hunks)
  • src/amr/messengers/synchronizer.hpp (1 hunks)
  • src/amr/messengers/synchronizer_pool.hpp (3 hunks)
  • src/amr/physical_models/hybrid_model.hpp (2 hunks)
  • src/amr/solvers/solver_ppc.hpp (1 hunks)
  • src/amr/wrappers/hierarchy.hpp (1 hunks)
  • src/core/data/vecfield/vecfield.hpp (2 hunks)
  • src/phare_amr.hpp (3 hunks)
  • src/simulator/phare_types.hpp (1 hunks)
Files skipped from review due to trivial changes (5)
  • src/amr/CMakeLists.txt
  • src/amr/messenger_registration.hpp
  • src/amr/messengers/communicator.hpp
  • src/amr/messengers/hybrid_messenger_info.hpp
  • src/simulator/phare_types.hpp
Additional comments (Suppressed): 23
src/amr/physical_models/hybrid_model.hpp (2)
  • 14-15: The inclusion of vecfield.hpp is new in this hunk. Ensure that this new dependency does not introduce circular dependencies or other issues.

  • 140-168: The fillMessengerInfo function has been updated. The VecFieldDescriptor type has been replaced with VecFieldNames for several member variables of hybridInfo. This change should be verified across the codebase to ensure that it doesn't break any existing functionality. Also, ensure that the dynamic_cast at line 143 is safe and that info can always be cast to HybridMessengerInfo. If not, this could lead to a std::bad_cast exception.

src/phare_amr.hpp (3)
  • 1-3: No changes were made in this hunk. The include guard is correctly defined.

  • 26-33: Two new headers have been included: "amr/data/particles/refine/splitter.hpp" and "amr/data/particles/refine/particles_data_split.hpp". Ensure that these files exist and are in the correct location.

  • 42-55: The type alias Splitter has been renamed to Splitter_t. The RefinementParams type alias has been updated to use Splitter_t instead of Splitter. Ensure that all references to Splitter in the codebase have been updated to Splitter_t.

src/amr/wrappers/hierarchy.hpp (1)
  • 23-25: The logger.hpp header file has been removed and replaced with meta_utilities.hpp. Ensure that logging functionality is not required in this file, or if it is, that it's being handled appropriately by the new header.
src/amr/solvers/solver_ppc.hpp (1)
  • 161-171: The fillMessengerInfo function has been updated to use the new VecFieldNames struct instead of the old VecFieldDescriptor. Ensure that this change is compatible with the rest of the codebase and that all instances of VecFieldDescriptor have been replaced with VecFieldNames. Also, the variable Epred is no longer used in this function. If it's not used elsewhere, consider removing it to avoid unused variable warnings.
-    auto const& Epred = electromagPred_.E;
src/amr/messengers/synchronizer_pool.hpp (3)
  • 42-47: The registerLevel function has been simplified. Ensure that the removal of the levelNumber and coarseLevel variables and the loop over synchronizer.algos does not affect the functionality of the code. If these variables and the loop are necessary for the correct operation of the code, they should be reintroduced.

  • 52-57: The sync function has been simplified. Ensure that the removal of the check for empty synchronizer.algos and the loop over synchronizer.algos does not affect the functionality of the code. If these checks and the loop are necessary for the correct operation of the code, they should be reintroduced.

  • 59-62: The constructor for SynchronizerPool has been added. This is a good practice as it allows for better resource management and initialization of member variables.

src/amr/messengers/refiner_pool.hpp (1)
  • 148-149: The RefinerPool class stores a std::map of refiners and a shared pointer to a ResourcesManager. If the ResourcesManager is shared among multiple RefinerPool instances, changes to the ResourcesManager in one RefinerPool will affect all other RefinerPool instances that share the same ResourcesManager. Ensure that this is the intended behavior.

Overall, the new code is well-structured and follows good practices such as using smart pointers and namespaces. The use of templates and type traits allows for flexibility and type safety. The code is also well-documented with clear comments explaining the purpose and usage of each function.

src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (12)
  • 11-29: The new hunk has added more include statements for different modules. Ensure that these modules are necessary for the current file and that they are available in the project. Also, check if these new modules introduce any circular dependencies.

  • 36-42: The new hunk has added an include statement for the string library. Ensure that this library is necessary for the current file and that it is available in the project.

  • 52-68: The new hunk has added a namespace qualifier PHARE::core:: to HybridQuantity::Scalar in the Property struct and FieldUser constructor. This change is acceptable if the HybridQuantity class is defined in the PHARE::core namespace. Ensure that all references to HybridQuantity::Scalar in the codebase have been updated to include the namespace qualifier.

  • 94-110: The new hunk has added several type aliases and template definitions related to field refinement and coarsening operations. Ensure that these new types and templates are necessary and correctly defined. Also, check if these changes affect any existing code that uses the old types.

  • 116-152: The new hunk has added several member initializations in the constructor. Ensure that these initializations are necessary and correctly implemented. Also, check if these changes affect any existing code that uses the old constructor.

  • 166-176: The new hunk has added a method allocate that allocates resources for Jold_, NiOldUser_, and ViOld_. Ensure that these resources are necessary and correctly allocated. Also, check if these changes affect any existing code that uses the old allocate method.

  • 179-190: The new hunk has added a method registerQuantities that takes two unique pointers to IMessengerInfo objects. Ensure that these pointers are correctly handled in the method. Also, check if these changes affect any existing code that uses the old registerQuantities method.

  • 200-238: The new hunk has added a method registerLevel that registers a level with several refiners and synchronizers. Ensure that these registrations are necessary and correctly implemented. Also, check if these changes affect any existing code that uses the old registerLevel method.

  • 285-312: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [255-342]

The new hunk has added a method initLevel that initializes a level with several refiners and fills several refiners with data. Ensure that these initializations and fill operations are necessary and correctly implemented. Also, check if these changes affect any existing code that uses the old initLevel method.

  • 357-362: The new hunk has added a method fillElectricGhosts that fills electric ghosts with data from several refiners. Ensure that these fill operations are necessary and correctly implemented. Also, check if these changes affect any existing code that uses the old fillElectricGhosts method.

  • 367-372: The new hunk has added a method fillCurrentGhosts that fills current ghosts with data from several refiners. Ensure that these fill operations are necessary and correctly implemented. Also, check if these changes affect any existing code that uses the old fillCurrentGhosts method.

  • 392-398: The new hunk has added a method fillPatchGhostParticles that fills patch ghost particles with data from a refiner. Ensure that this fill operation is necessary and correctly implemented. Also, check if these changes affect any existing code that uses the old fillPatchGhostParticles method.

src/core/data/vecfield/vecfield.hpp Outdated Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Outdated Show resolved Hide resolved
src/amr/messengers/refiner.hpp Outdated Show resolved Hide resolved
src/amr/messengers/synchronizer.hpp Outdated Show resolved Hide resolved
src/amr/messengers/synchronizer.hpp Show resolved Hide resolved
src/amr/messengers/synchronizer_pool.hpp Outdated Show resolved Hide resolved
src/amr/messengers/refiner_pool.hpp Show resolved Hide resolved
src/amr/messengers/refiner_pool.hpp Show resolved Hide resolved
src/amr/messengers/refiner_pool.hpp Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 2

Commits Files that changed from the base of the PR and between 19a68f4 and 0e42396.
Files selected for processing (4)
  • src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (30 hunks)
  • src/amr/messengers/synchronizer.hpp (1 hunks)
  • src/amr/messengers/synchronizer_pool.hpp (3 hunks)
  • src/core/data/vecfield/vecfield.hpp (2 hunks)
Additional comments (Suppressed): 22
src/core/data/vecfield/vecfield.hpp (1)
  • 27-34: The copy constructor and copy assignment operator for VecField have been correctly deleted to prevent shallow copying of the object. The move constructor and move assignment operator have been defaulted, which is appropriate for this class as it does not manage any resources that would require a custom move operation. This change improves the safety and correctness of the code.
src/amr/messengers/synchronizer.hpp (5)
  • 10-11: The Communicator class is being inherited privately. This is a good practice when you want to use the base class's functionality but don't want to expose its interface to the users of the derived class. However, it's important to ensure that the base class doesn't have any virtual functions that need to be overridden, as they won't be accessible in the derived class.

  • 17-31: The constructor Synchronizer(core::VecFieldNames const& descriptor, std::shared_ptr<ResourcesManager> const& rm, std::shared_ptr<SAMRAI::hier::CoarsenOperator> coarsenOp) is using a lambda function registerCoarsen to register coarsen operations for x, y, and z components of the vector field. This is a good use of lambda functions to avoid code duplication.

  • 34-42: The constructor Synchronizer(std::string const& name, std::shared_ptr<ResourcesManager> const& rm, std::shared_ptr<SAMRAI::hier::CoarsenOperator> coarsenOp) is registering a coarsen operation for a single field. It's important to ensure that the field name provided exists in the ResourcesManager, as the getID function might return a null value if the field doesn't exist.

  • 46-54: The registerLevel function is creating a schedule for each algorithm and adding it to the Communicator base class. It's important to ensure that the level number provided is greater than 0, as the function is trying to access the level number - 1 in the hierarchy. If the level number is 0, this will result in an error.

  • 57-64: The sync function is coarsening data for each algorithm. It's important to ensure that the level number provided exists in the Communicator base class, as the findSchedule function might return a null value if the level doesn't exist.

src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (12)
  • 11-29: The new hunk includes additional header files that were not present in the old hunk. Ensure that these new includes are necessary and do not introduce circular dependencies or other issues.

  • 11-29: > Note: This review was outside of the patch, but no patch was found that overlapped with it. Original lines [52-42]

The new hunk includes the <string> header file which was not present in the old hunk. Ensure that this new include is necessary and does not introduce circular dependencies or other issues.

  • 54-66: The new hunk has added the PHARE::core:: namespace to the HybridQuantity::Scalar type. Ensure that this change is consistent with the rest of the codebase and does not introduce any issues.

  • 94-110: The new hunk introduces several new type aliases and templates that were not present in the old hunk. Ensure that these new types are necessary and correctly implemented.

  • 116-152: The new hunk introduces several new member initializations in the constructor that were not present in the old hunk. Ensure that these new initializations are necessary and correctly implemented.

  • 168-176: The new hunk introduces a call to resourcesManager_->allocate(ViOld_, patch, allocateTime); that was not present in the old hunk. Ensure that this new call is necessary and correctly implemented.

  • 181-190: No significant changes detected in the new hunk compared to the old hunk.

  • 200-238: The new hunk introduces several new calls to registerLevel on various refiners that were not present in the old hunk. Ensure that these new calls are necessary and correctly implemented.

  • 285-312: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [255-342]

The new hunk introduces several new calls to fill and registerLevel on various refiners that were not present in the old hunk. Ensure that these new calls are necessary and correctly implemented.

  • 357-364: The new hunk removes a debug print statement that was present in the old hunk. Ensure that this change does not affect the debugging process.

  • 367-374: No significant changes detected in the new hunk compared to the old hunk.

  • 392-398: No significant changes detected in the new hunk compared to the old hunk.

src/amr/messengers/synchronizer_pool.hpp (4)
  • 42-47: The registerLevel method has been simplified. It no longer retrieves the coarse level from the hierarchy and does not iterate over the algorithms to add them to the synchronizer. Ensure that this change does not affect the functionality of the code.

  • 52-57: The sync method has been simplified. It no longer checks if any algorithms are configured and does not call the coarsenData() function on the corresponding schedule for the given level number. Ensure that this change does not affect the functionality of the code.

  • 59-62: The constructor now takes a std::shared_ptr<ResourcesManager> and initializes the rm_ member variable. This is a good practice as it ensures that the ResourcesManager is initialized before the SynchronizerPool is used.

  • 64-66: The synchronizers_ map now stores Synchronizer<ResourcesManager> objects instead of Communicator<Synchronizer, dimension> objects. Ensure that this change does not affect the functionality of the code.

src/amr/messengers/synchronizer_pool.hpp Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 0e42396 and 2186063.
Files selected for processing (1)
  • tests/simulator/test_advance.py (1 hunks)
Additional comments (Suppressed): 1
tests/simulator/test_advance.py (1)
  • 294-298: The absolute tolerance for comparing two arrays has been increased from 4e-15 to 5e-15. Ensure that this change does not affect the precision of the tests and that it is still within acceptable limits for the application.
- np.testing.assert_allclose(slice1, slice2, atol=4e-15, rtol=0)
+ np.testing.assert_allclose(slice1, slice2, atol=5e-15, rtol=0)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 2186063 and 655e4b2.
Files selected for processing (1)
  • tests/simulator/test_advance.py (2 hunks)
Additional comments (Suppressed): 2
tests/simulator/test_advance.py (2)
  • 290-298: The absolute tolerance for the np.testing.assert_allclose function has been increased from 4e-15 to 5e-15. This change seems to be based on empirical observations and is likely intended to account for rounding errors in the calculations. However, it's important to ensure that this change doesn't mask any potential issues in the underlying calculations or algorithms. If the discrepancy is consistently larger than expected, it might be worth investigating the cause.

  • 534-544: The absolute tolerance for the np.testing.assert_allclose function has been increased from 1e-15 to 2e-15. As with the previous comment, this change seems to be based on empirical observations and is likely intended to account for rounding errors in the calculations. However, it's important to ensure that this change doesn't mask any potential issues in the underlying calculations or algorithms. If the discrepancy is consistently larger than expected, it might be worth investigating the cause.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 9

Commits Files that changed from the base of the PR and between 7d9c46f and 596c16f.
Files selected for processing (16)
  • src/amr/CMakeLists.txt (1 hunks)
  • src/amr/messenger_registration.hpp (2 hunks)
  • src/amr/messengers/communicator.hpp (4 hunks)
  • src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (30 hunks)
  • src/amr/messengers/hybrid_messenger_info.hpp (2 hunks)
  • src/amr/messengers/refiner.hpp (1 hunks)
  • src/amr/messengers/refiner_pool.hpp (1 hunks)
  • src/amr/messengers/synchronizer.hpp (1 hunks)
  • src/amr/messengers/synchronizer_pool.hpp (3 hunks)
  • src/amr/physical_models/hybrid_model.hpp (2 hunks)
  • src/amr/solvers/solver_ppc.hpp (1 hunks)
  • src/amr/wrappers/hierarchy.hpp (1 hunks)
  • src/core/data/vecfield/vecfield.hpp (2 hunks)
  • src/phare_amr.hpp (3 hunks)
  • src/simulator/phare_types.hpp (1 hunks)
  • tests/simulator/test_advance.py (2 hunks)
Files skipped from review due to trivial changes (3)
  • src/amr/CMakeLists.txt
  • src/amr/messenger_registration.hpp
  • src/amr/messengers/communicator.hpp
Additional comments (Suppressed): 41
src/simulator/phare_types.hpp (1)
  • 37-37: The type alias for Splitter has been changed from Splitter to Splitter_t. Ensure that this change is reflected throughout the codebase and does not break any existing functionality.
-    using Splitter = typename amr_types::Splitter;
+    using Splitter = typename amr_types::Splitter_t;
src/amr/physical_models/hybrid_model.hpp (2)
  • 14-14: The inclusion of vecfield.hpp is new in this hunk. Ensure that this new dependency does not introduce circular dependencies or other issues.

  • 140-168: The fillMessengerInfo function has been updated to use core::VecFieldNames instead of amr::VecFieldDescriptor. This change should be verified across the codebase to ensure that all instances of amr::VecFieldDescriptor have been replaced with core::VecFieldNames and that this change does not break any functionality.

src/amr/wrappers/hierarchy.hpp (1)
  • 23-25: The inclusion of core/utilities/meta/meta_utilities.hpp is new. Ensure that this new dependency does not introduce any unwanted side effects or conflicts with existing code.
src/amr/messengers/hybrid_messenger_info.hpp (2)
  • 38-38: The VecFieldDescriptor class has been replaced with VecFieldNames from the core namespace. Ensure that this change is compatible with the rest of the codebase and that all instances of VecFieldDescriptor have been updated accordingly.

  • 42-68: The VecFieldDescriptor objects have been replaced with VecFieldNames objects. This change simplifies the code and improves readability. However, ensure that the VecFieldNames struct provides all the necessary functionality that was previously provided by the VecFieldDescriptor class.

src/phare_amr.hpp (3)
  • 1-3: No changes have been made in this hunk. The include guard is intact.

  • 26-33: Two new header files have been included: splitter.hpp and particles_data_split.hpp. Ensure that these files exist and are located in the correct directories. Also, verify that the functions or classes defined in these files are used in the current file.

  • 42-55: The type alias Splitter has been renamed to Splitter_t. Ensure that all references to Splitter in the codebase have been updated to Splitter_t to avoid any compilation errors.

tests/simulator/test_advance.py (2)
  • 290-298: The absolute tolerance for the np.testing.assert_allclose function has been increased from 4e-15 to 5e-15. This change might be due to the observed maximum absolute value being 4.21e-15, as mentioned in the comment. Ensure that this change does not affect the precision of the tests and that it is still within acceptable limits.

  • 534-544: The absolute tolerance for the np.testing.assert_allclose function has been increased from 1e-15 to 2e-15. This change might be due to the test failing for the clang compiler with MPI at 1.07e-15, as mentioned in the comment. Ensure that this change does not affect the precision of the tests and that it is still within acceptable limits.

src/core/data/vecfield/vecfield.hpp (1)
  • 27-34: The copy constructor and copy assignment operator have been correctly deleted to prevent shallow copying of the VecField object. The move constructor and move assignment operator are defaulted, which is appropriate for this class as it does not manage any resources that would require a custom move operation. This change improves the safety and correctness of the class.
src/amr/messengers/synchronizer.hpp (2)
  • 1-68: The Synchronizer class is well designed and follows the SOLID principles. It encapsulates the synchronization logic and provides a clear interface for registering and synchronizing levels. The use of lambda functions for registering coarsen operations is a good practice as it reduces code duplication. However, there is a potential issue with error handling in the sync method.

The sync method throws a std::runtime_error if no algorithms are configured. This is a good practice as it prevents the method from silently failing. However, it would be better to check this condition in the constructor or in the registerLevel method. This way, the error can be caught earlier, and the sync method can be made noexcept. This would improve the robustness of the class and make it easier to use.

Here is a possible change:

* 34-42: +    Synchronizer(std::string const& name, std::shared_ptr<ResourcesManager> const& rm,
+                 std::shared_ptr<SAMRAI::hier::CoarsenOperator> coarsenOp)
+    {
+        auto id = rm->getID(name);
+        if (!id)
+            throw std::runtime_error("Invalid resource manager ID");
+        this->add_algorithm()->registerCoarsen(*id, *id, coarsenOp);
+    }



</blockquote></details>
<details><summary>src/amr/messengers/synchronizer_pool.hpp (5)</summary><blockquote>

* 16-37: The `add` function has been refactored to directly instantiate a `Synchronizer` object instead of calling `makeSynchronizer`. This change simplifies the code and removes the need for the `makeSynchronizer` function. However, it's important to ensure that the `Synchronizer` constructor is compatible with the arguments passed in the `add` function. Also, the `ResourcesManager` is now a template parameter for the `SynchronizerPool` class instead of the `add` function, which simplifies the function signature but requires the `ResourcesManager` to be the same for all synchronizers in the pool. Please verify that this change is intended and does not affect the functionality.



* 42-47: The `registerLevel` function has been simplified. The new version directly calls the `registerLevel` function on each `Synchronizer` in the pool. This change removes the need to manually add algorithms and their schedules to the synchronizer, which simplifies the code and reduces the risk of errors. However, it's important to ensure that the `registerLevel` function of the `Synchronizer` class correctly handles the registration of the level.



* 52-57: The `sync` function has been simplified. The new version directly calls the `sync` function on each `Synchronizer` in the pool. This change removes the need to manually coarsen data for each algorithm in the synchronizer, which simplifies the code and reduces the risk of errors. However, it's important to ensure that the `sync` function of the `Synchronizer` class correctly handles the synchronization of the data.



* 59-62: The `SynchronizerPool` constructor now takes a `ResourcesManager` as an argument and stores it in a member variable. This change allows the `ResourcesManager` to be shared among all synchronizers in the pool, which simplifies the function signatures of the `add` functions. However, it's important to ensure that the `ResourcesManager` is thread-safe if it's shared among multiple synchronizers.



* 64-67: The `synchronizers_` map now stores `Synchronizer` objects instead of `Communicator` objects. This change simplifies the code and removes the need for the `Communicator` class. However, it's important to ensure that the `Synchronizer` class provides all the necessary functionality that was previously provided by the `Communicator` class.



</blockquote></details>
<details><summary>src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (12)</summary><blockquote>

* 14-15: The new hunk introduces two new includes for `field_refine_operator.hpp` and `field_coarsen_operator.hpp`. Ensure that these new dependencies are necessary and that they do not introduce circular dependencies or other issues.



* 39-39: The new hunk introduces an include for `string`. Ensure that this new dependency is necessary and that it does not introduce circular dependencies or other issues.



* 54-66: The new hunk introduces a namespace `PHARE::core::HybridQuantity::Scalar` for the `qty` variable and the `quantity` member of the `FieldUser` class. Ensure that this change is reflected throughout the codebase and that it does not introduce any issues.



* 97-107: The new hunk introduces several new type aliases and templates. Ensure that these new types are necessary and that they do not introduce any issues.



* 119-141: The new hunk introduces several new member variables for the class. Ensure that these new members are necessary and that they do not introduce any issues.



* 174-176: The new hunk introduces calls to `resourcesManager_->allocate` for `Jold_`, `NiOldUser_`, and `ViOld_`. Ensure that these new calls are necessary and that they do not introduce any issues.



* 189-190: The new hunk introduces a change in the function signature for `registerQuantities`. Ensure that this change is reflected throughout the codebase and that it does not introduce any issues.



* 211-237: The new hunk introduces several new calls to `registerLevel` for various refiners. Ensure that these new calls are necessary and that they do not introduce any issues.



* 323-324: The new hunk introduces calls to `fill` for `magneticInitRefiners_` and `electricInitRefiners_`, and comments out calls to `fill` for `magGhostsRefiners_` and `elecGhostsRefiners_`. Ensure that these changes are necessary and that they do not introduce any issues.



* 360-361: The new hunk introduces calls to `fill` for `elecSharedNodesRefiners_` and `elecGhostsRefiners_`. Ensure that these new calls are necessary and that they do not introduce any issues.



* 370-371: The new hunk introduces calls to `fill` for `currentSharedNodesRefiners_` and `currentGhostsRefiners_`. Ensure that these new calls are necessary and that they do not introduce any issues.



* 395-395: The new hunk introduces a call to `fill` for `patchGhostPartRefiners_`. Ensure that this new call is necessary and that it does not introduce any issues.



</blockquote></details>
<details><summary>src/amr/messengers/refiner_pool.hpp (9)</summary><blockquote>

* 23-24: The `RefinerPool` class has been updated to use a template parameter for the `ResourcesManager` and `RefinerType`. This change allows for more flexibility in the types of resources that can be managed by the `RefinerPool`. However, it's important to ensure that the `ResourcesManager` type used in practice provides the necessary functionality expected by the `RefinerPool` class.



* 33-35: The `addStaticRefiners` function has been updated to take a `std::shared_ptr<RefineOperator>` and a `std::vector<std::string>` for keys. This change allows for more flexibility in the types of refine operators that can be used and the keys that can be associated with them. However, it's important to ensure that the `RefineOperator` type used in practice provides the necessary functionality expected by the `addStaticRefiners` function.



* 62-66: The `addTimeRefiners` function has been updated to take a `std::shared_ptr<RefineOperator>` and a `std::shared_ptr<SAMRAI::hier::TimeInterpolateOperator>`. This change allows for more flexibility in the types of refine and time interpolate operators that can be used. However, it's important to ensure that the `RefineOperator` and `SAMRAI::hier::TimeInterpolateOperator` types used in practice provide the necessary functionality expected by the `addTimeRefiners` function.



* 95-97: The `registerLevel` function has been simplified to loop over the `refiners_` map and call the `registerLevel` function on each refiner. This change simplifies the code and makes it easier to understand. However, it's important to ensure that the `registerLevel` function of each refiner provides the necessary functionality expected by the `registerLevel` function of the `RefinerPool` class.



* 107-113: The `fill` function has been simplified to loop over the `refiners_` map and call the `fill` function on each refiner. This change simplifies the code and makes it easier to understand. However, it's important to ensure that the `fill` function of each refiner provides the necessary functionality expected by the `fill` function of the `RefinerPool` class.



* 117-123: The `fill` function for `VecFieldT` has been updated to throw a `std::runtime_error` if no refiner is found for the given `VecFieldT`. This change improves error handling by providing a clear error message when a refiner is not found. However, it's important to ensure that this change does not introduce any unexpected behavior in the code.



* 127-137: The `regrid` function has been simplified to loop over the `refiners_` map and call the `regrid` function on each refiner. This change simplifies the code and makes it easier to understand. However, it's important to ensure that the `regrid` function of each refiner provides the necessary functionality expected by the `regrid` function of the `RefinerPool` class.



* 237-240: The `addStaticRefiner`, `addTimeRefiner` functions have been updated to throw a `std::runtime_error` if a refiner with the given key is already registered. This change improves error handling by providing a clear error message when a refiner is already registered. However, it's important to ensure that this change does not introduce any unexpected behavior in the code.



* 212-216: The `addStaticRefiners`, `addStaticRefiner`, and `addTimeRefiners` functions have been updated to use the `addStaticRefiner` and `addTimeRefiner` functions to add refiners. This change simplifies the code and makes it easier to understand. However, it's important to ensure that the `addStaticRefiner` and `addTimeRefiner` functions provide the necessary functionality expected by the `addStaticRefiners` and `addTimeRefiners` functions.



</blockquote></details>
<details><summary>src/amr/solvers/solver_ppc.hpp (1)</summary><blockquote>

* 161-171: The `dynamic_cast` on line 164 could potentially throw a `std::bad_cast` exception if the `info` object is not of type `amr::HybridMessengerInfo`. It would be safer to use `dynamic_cast` in a try-catch block to handle this exception gracefully. Also, ensure that all calls to this function throughout the codebase have been updated to match the new signature and the replacement of `VecFieldDescriptor` with `core::VecFieldNames`.
```diff
-    auto& hybridInfo = dynamic_cast<amr::HybridMessengerInfo&>(*info);
+    amr::HybridMessengerInfo* hybridInfoPtr = dynamic_cast<amr::HybridMessengerInfo*>(info.get());
+    if (!hybridInfoPtr) {
+        // Handle the error appropriately, e.g., throw an exception or return an error code
+        throw std::runtime_error("Invalid IMessengerInfo type");
+    }
+    auto& hybridInfo = *hybridInfoPtr;

src/amr/messengers/refiner.hpp Outdated Show resolved Hide resolved
src/core/data/vecfield/vecfield.hpp Show resolved Hide resolved
src/amr/messengers/synchronizer.hpp Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 596c16f and 433aa16.
Files selected for processing (1)
  • tests/simulator/test_advance.py (2 hunks)
Additional comments (Suppressed): 2
tests/simulator/test_advance.py (2)
  • 293-298: The absolute tolerance for the np.testing.assert_allclose function has been increased from 4e-15 to 5.5e-15. This change is justified by the comment that explains the empirical max absolute observed is 5.2e-15. However, it's important to ensure that this change doesn't mask any potential issues in the code that could lead to larger discrepancies in the future.

  • 539-544: The absolute tolerance for the np.testing.assert_allclose function has been increased from 1e-15 to 2e-15. The comment explains that this change was made because a test failed at 1.07e-15 when using the Clang compiler with MPI. While this change seems reasonable, it's important to ensure that this doesn't mask any potential issues in the code that could lead to larger discrepancies in the future.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 9

Commits Files that changed from the base of the PR and between 433aa16 and 1e09bd6.
Files selected for processing (1)
  • src/amr/messengers/refiner.hpp (1 hunks)

src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
raising threshold for test_field_coarsening_via_subcycles to 2e-15
raising threshold advance test field overlap equal to 5.5e-15 after failure for mpi/clang build
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 11

Commits Files that changed from the base of the PR and between 7d9c46f and 862b478.
Files selected for processing (16)
  • src/amr/CMakeLists.txt (1 hunks)
  • src/amr/messenger_registration.hpp (2 hunks)
  • src/amr/messengers/communicator.hpp (4 hunks)
  • src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (30 hunks)
  • src/amr/messengers/hybrid_messenger_info.hpp (2 hunks)
  • src/amr/messengers/refiner.hpp (1 hunks)
  • src/amr/messengers/refiner_pool.hpp (1 hunks)
  • src/amr/messengers/synchronizer.hpp (1 hunks)
  • src/amr/messengers/synchronizer_pool.hpp (3 hunks)
  • src/amr/physical_models/hybrid_model.hpp (2 hunks)
  • src/amr/solvers/solver_ppc.hpp (1 hunks)
  • src/amr/wrappers/hierarchy.hpp (1 hunks)
  • src/core/data/vecfield/vecfield.hpp (2 hunks)
  • src/phare_amr.hpp (3 hunks)
  • src/simulator/phare_types.hpp (1 hunks)
  • tests/simulator/test_advance.py (2 hunks)
Files skipped from review due to trivial changes (3)
  • src/amr/CMakeLists.txt
  • src/amr/messenger_registration.hpp
  • src/amr/wrappers/hierarchy.hpp
Additional comments (Suppressed): 52
src/simulator/phare_types.hpp (1)
  • 37-37: The type alias Splitter has been renamed to Splitter_t. Ensure that all references to this type alias in the codebase have been updated to reflect this change.
-    using Splitter         = typename amr_types::Splitter;
+    using Splitter         = typename amr_types::Splitter_t;
src/core/data/vecfield/vecfield.hpp (2)
  • 27-37: The copy constructor and copy assignment operator have been explicitly deleted, which is a good practice for classes that manage resources to avoid shallow copying. The move constructor and move assignment operator are defaulted, which is also good for performance reasons. However, the copy constructor declaration on line 31 has been corrected from the previous version. Ensure that this change does not affect any existing code that might have been using the incorrect copy constructor.

  • 238-256: The VecFieldNames struct has been introduced to hold the names of the vector field and its components. This is a good practice for code organization and readability. The constructor takes a VecField object and initializes the names based on the VecField's name and component names. This is a good use of encapsulation and makes the code more maintainable.

src/amr/physical_models/hybrid_model.hpp (3)
  • 14-14: The inclusion of vecfield.hpp is new in this hunk. Ensure that this new dependency does not introduce circular dependencies or other issues.

  • 145-156: The VecFieldNames struct is being used instead of VecFieldDescriptor. Ensure that this change is reflected in all parts of the codebase that interact with these fields.

  • 160-167: The transform_ lambda function is used to populate various fields in hybridInfo with the names of the ions. This is a good use of std::transform and lambda functions to avoid code duplication.

src/amr/messengers/hybrid_messenger_info.hpp (3)
  • 38-38: The VecFieldDescriptor struct has been replaced with VecFieldNames from the core namespace. Ensure that this change does not affect the functionality of the HybridMessengerInfo class and that all instances of VecFieldDescriptor have been updated to VecFieldNames throughout the codebase.

  • 41-68: The member variables of the HybridMessengerInfo class have been updated. The VecFieldDescriptor objects have been replaced with VecFieldNames and the PopulationDescriptor objects have been replaced with std::string. Ensure that these changes are reflected in all parts of the code that use these member variables.

  • 47-47: The modelIonDensity member variable has been changed from a FieldDescriptor to a std::string. Ensure that this change does not affect the functionality of the HybridMessengerInfo class and that all instances of modelIonDensity have been updated throughout the codebase.

src/phare_amr.hpp (4)
  • 1-3: No changes have been made in this hunk. The include guard is correctly defined.

  • 26-33: Two new header files have been included: splitter.hpp and particles_data_split.hpp. Ensure that these files exist and are located in the correct directories. Also, verify that the functionality they provide is required in this file.

  • 45-47: The type alias Splitter has been renamed to Splitter_t. Ensure that all references to Splitter in the codebase have been updated to Splitter_t to prevent any compilation errors.

  • 51-52: The RefinementParams type alias now uses Splitter_t instead of Splitter. This change is consistent with the renaming of Splitter to Splitter_t.

src/amr/messengers/synchronizer.hpp (6)
  • 1-4: The inclusion of the communicator.hpp and vecfield.hpp headers indicates that the Synchronizer class is dependent on the Communicator and VecField classes. Ensure that these dependencies are well managed and that any changes in these classes do not adversely affect the Synchronizer class.

  • 10-11: The Synchronizer class is inheriting from Communicator privately. This means that public and protected members of Communicator become private in Synchronizer, and are not accessible to classes that inherit from Synchronizer. If this is the intended behavior, then it's fine. Otherwise, consider changing the inheritance to public or protected.

  • 17-31: The constructor Synchronizer(core::VecFieldNames const& descriptor, std::shared_ptr<ResourcesManager> const& rm, std::shared_ptr<SAMRAI::hier::CoarsenOperator> coarsenOp) is using a lambda function registerCoarsen to register coarsen operations for the x, y, and z components of a vector field. This is a good use of lambda functions to avoid code duplication.

  • 34-42: The constructor Synchronizer(std::string const& name, std::shared_ptr<ResourcesManager> const& rm, std::shared_ptr<SAMRAI::hier::CoarsenOperator> coarsenOp) is registering a coarsen operation for a single field. This is a good use of constructor overloading to provide flexibility in the use of the Synchronizer class.

  • 46-54: The registerLevel method is creating a schedule for each algorithm in this->algos and adding it to the Communicator base class. This is a good use of the Communicator class's functionality.

  • 57-64: The sync method is calling coarsenData on the schedule associated with each algorithm in this->algos. It throws a std::runtime_error if this->algos is empty. This is a good use of error handling to prevent runtime errors.

src/amr/solvers/solver_ppc.hpp (1)
  • 161-171: The function signature has been changed and now takes a std::unique_ptr<amr::IMessengerInfo> const& instead of a std::unique_ptr<amr::IMessengerInfo>&. This change makes sense as the function does not modify the info object and should therefore take a const reference. However, please verify that all calls to this function throughout the codebase have been updated to match the new signature.
tests/simulator/test_advance.py (2)
  • 290-298: The absolute tolerance for the np.testing.assert_allclose function has been increased from 4e-15 to 5.5e-15. This change is based on empirical observations and is intended to account for rounding errors that may occur during the filling of ghosts with schedules involving linear/spatial interpolations. Ensure that this change does not affect the accuracy of the tests and that it is still within acceptable limits.

  • 534-546: The absolute tolerance for the np.testing.assert_allclose function has been increased from 1e-15 to 2e-15. This change is based on a failure observed in a clang build for an MPI test. Ensure that this change does not affect the accuracy of the tests and that it is still within acceptable limits.

src/amr/messengers/communicator.hpp (6)
  • 14-17: The new hunk has removed several includes that were present in the old hunk. Please verify that these includes are not needed anymore or have been moved to other files. If they are still needed, this could lead to compilation errors or undefined behavior.

  • 24-34: The Refiner and Synchronizer structs have been renamed to RefinerTypes and SynchronizerTypes respectively. Ensure that all references to these structs in the codebase have been updated to reflect this change.

  • 38-39: The Communicator class template now takes an additional template parameter dimension. Ensure that all instantiations of this class have been updated to include this parameter.

  • 47-48: The is_refiner and is_synchronizer static constexpr variables have been moved inside the Communicator class. Ensure that all references to these variables have been updated to reflect this change.

  • 65-73: The add_algorithm function has been updated to use if constexpr for compile-time condition checking. This is a good use of modern C++ features to improve code readability and performance.

105:
There's a typo in the comment "oevrload with rvalue schedule". It should be "overload with rvalue schedule".

-        // oevrload with  rvalue schedule
+        // overload with rvalue schedule
  • 116-118: The new hunk has removed several function definitions that were present in the old hunk. Please verify that these functions are not needed anymore or have been moved to other files. If they are still needed, this could lead to compilation errors or undefined behavior.
src/amr/messengers/hybrid_hybrid_messenger_strategy.hpp (13)
  • 11-29: The new hunk has added more header files to be included. Ensure that these new includes are necessary and do not introduce circular dependencies or conflicts.

  • 36-42: The new hunk has added the inclusion of the <string> library. Ensure that this new include is necessary and does not introduce conflicts.

  • 52-68: The new hunk has added the PHARE::core:: namespace to the HybridQuantity::Scalar type. This change should not affect the functionality of the code, but it does make the type more explicit. Ensure that this change is consistent with the rest of the codebase.

  • 94-110: The new hunk has added several type definitions and template type aliases. Ensure that these new types are necessary and do not introduce conflicts or unnecessary complexity.

  • 116-156: The new hunk has added several member initializations in the constructor. Ensure that these new initializations are necessary and do not introduce memory leaks or other resource management issues.

  • 166-176: The new hunk has added calls to resourcesManager_->allocate() for Jold_, NiOldUser_, and ViOld_. Ensure that these new calls are necessary and do not introduce memory leaks or other resource management issues.

  • 189-190: The new hunk has added the [[maybe_unused]] attribute to the fromCoarserInfo parameter in the registerQuantities() function. This change indicates that fromCoarserInfo may not be used in the function, which can suppress compiler warnings. Ensure that this change is accurate and does not hide any potential issues.

  • 200-238: The new hunk has added calls to registerLevel() for several member objects. Ensure that these new calls are necessary and do not introduce any issues with level registration.

  • 255-264: The new hunk has added calls to fill() for magneticInitRefiners_, electricInitRefiners_, and domainParticlesRefiners_, and a call to patchGhostPartRefiners_.fill(). Ensure that these new calls are necessary and do not introduce any issues with data filling.

  • 285-312: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [270-342]

The new hunk has added calls to fill() for several member objects. Ensure that these new calls are necessary and do not introduce any issues with data filling.

  • 357-362: The new hunk has added calls to fill() for elecSharedNodesRefiners_ and elecGhostsRefiners_ in the fillElectricGhosts() function. Ensure that these new calls are necessary and do not introduce any issues with data filling.

  • 367-372: The new hunk has added calls to fill() for currentSharedNodesRefiners_ and currentGhostsRefiners_ in the fillCurrentGhosts() function. Ensure that these new calls are necessary and do not introduce any issues with data filling.

  • 392-398: The new hunk has added a call to fill() for patchGhostPartRefiners_ in the fillPatchGhostParticles() function. Ensure that this new call is necessary and does not introduce any issues with data filling.

src/amr/messengers/synchronizer_pool.hpp (5)
  • 16-37: The add function has been overloaded to accept either a Descriptor or a core::VecFieldNames as the first argument. This is a good practice as it provides flexibility in the types of descriptors that can be added to the SynchronizerPool. However, ensure that all calls to this function throughout the codebase have been updated to match the new signatures.

  • 42-47: The registerLevel function has been simplified. It no longer retrieves the level number or the coarse level from the hierarchy, and it no longer iterates over the algorithms of each synchronizer. Instead, it simply calls the registerLevel function on each synchronizer. This change simplifies the code and reduces complexity. However, ensure that the registerLevel function of the Synchronizer class handles the logic that was previously in this function.

  • 52-57: The sync function has been simplified. It no longer checks if the algorithms are configured or calls the coarsenData function on the schedule. Instead, it simply calls the sync function on each synchronizer. This change simplifies the code and reduces complexity. However, ensure that the sync function of the Synchronizer class handles the logic that was previously in this function.

  • 59-62: The constructor of the SynchronizerPool class now takes a std::shared_ptr<ResourcesManager> as an argument and initializes the rm_ member variable with it. This is a good practice as it allows the ResourcesManager to be shared among different instances of the SynchronizerPool class. However, ensure that all instances of the SynchronizerPool class are created with a ResourcesManager.

  • 64-67: The synchronizers_ member variable now stores instances of the Synchronizer class instead of the Communicator class. This change is consistent with the introduction of the Synchronizer class and the simplification of the Communicator class. However, ensure that the Synchronizer class provides the same functionality as the Communicator class.

src/amr/messengers/refiner_pool.hpp (6)
  • 119-123: The function fill throws a runtime error when there is no refiner for the given vec.name(). This is a good practice as it prevents further execution with invalid data. However, it would be beneficial to also log this error for easier debugging.

  • 159-164: The function addStaticRefiners uses an assert to ensure that the sizes of destinations and sources match. This is a good practice as it prevents further execution with invalid data. However, it would be beneficial to also log this error for easier debugging.

  • 237-240: The addStaticRefiner and addTimeRefiner functions throw a runtime error when a refiner with the given key is already registered. This is a good practice as it prevents further execution with invalid data. However, it would be beneficial to also log this error for easier debugging.

  • 240-241: The addStaticRefiner and addTimeRefiner functions use structured bindings (auto const [it, success]) to handle the result of std::map::insert. This is a good practice as it makes the code more readable and easier to understand.

  • 127-137: The fill and regrid functions use range-based for loops to iterate over the refiners_ map. This is a good practice as it makes the code more readable and easier to understand.

  • 140-143: The constructor for RefinerPool takes a shared_ptr to a ResourcesManager and stores it in a member variable. This is a good practice as it ensures that the ResourcesManager will not be destroyed while the RefinerPool is still using it.

src/amr/physical_models/hybrid_model.hpp Show resolved Hide resolved
src/amr/solvers/solver_ppc.hpp Show resolved Hide resolved
src/amr/solvers/solver_ppc.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner.hpp Show resolved Hide resolved
src/amr/messengers/refiner_pool.hpp Show resolved Hide resolved
@nicolasaunai nicolasaunai mentioned this pull request Oct 23, 2023
@nicolasaunai nicolasaunai merged commit fbcb6e3 into PHAREHUB:master Oct 24, 2023
PhilipDeegan pushed a commit to PhilipDeegan/PHARE that referenced this pull request Nov 2, 2023
…EHUB#757)

* some refactoring of messenger stuff and cleaning here and there

* raising threshold for advance field test to 5e-15
raising threshold for test_field_coarsening_via_subcycles to 2e-15
raising threshold advance test field overlap equal to 5.5e-15 after failure for mpi/clang build
PhilipDeegan pushed a commit to PhilipDeegan/PHARE that referenced this pull request Nov 15, 2023
…EHUB#757)

* some refactoring of messenger stuff and cleaning here and there

* raising threshold for advance field test to 5e-15
raising threshold for test_field_coarsening_via_subcycles to 2e-15
raising threshold advance test field overlap equal to 5.5e-15 after failure for mpi/clang build
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.

2 participants