Skip to content

Refactor preCICE and domain decomposition handling#289

Merged
Snapex2409 merged 11 commits into
developfrom
refactor-coupling
Jun 20, 2026
Merged

Refactor preCICE and domain decomposition handling#289
Snapex2409 merged 11 commits into
developfrom
refactor-coupling

Conversation

@Snapex2409

@Snapex2409 Snapex2409 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

This PR was initially intended to only refactor the handling of preCICE. However, since the interaction among preCICE, domain decomposition, and performance profiling was tightly intertwined, all these changes are now part of this PR.

The implemented changes are:

  • preCICE:
    • Handling of preCICE was moved to tools/coupling.py using the CouplingHandler
    • It manages all coupling-related aspects, is aware of the access region and can read and write data from and to preCICE for valid GIDs
    • It creates the initial GIDs.
  • Domain Decomposition:
    • Was split into a class hierarchy to reuse more code.
    • Added a dummy decomposer for non-parallel cases. This way, a domain decomposer is generated in all execution paths.
    • The partition method splits the vertices obtained from the access region and returns the rank local points.
  • Profiling:
    • Previously, the preCICE participant object was passed around for profiling purposes.
    • Now, effectively, a Profiling interface object is used instead.
    • It also ensures (in debug mode) that no overlapping profiling regions are created.

Checklist:

  • I made sure that the CI passed before I ask for a review.
  • I added a summary of the changes (compared to the last release) in the CHANGELOG.md.
  • If necessary, I made changes to the documentation and/or added new content.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@Snapex2409 Snapex2409 force-pushed the refactor-coupling branch from acbaed6 to b7d29b9 Compare June 4, 2026 21:16
# Conflicts:
#	tests/unit/test_adaptivity_parallel.py

# Conflicts:
#	micro_manager/adaptivity/global_adaptivity.py
#	micro_manager/load_balancing.py
#	micro_manager/micro_manager.py
could not split refactorings
@Snapex2409 Snapex2409 force-pushed the refactor-coupling branch from d5be900 to b660c8d Compare June 6, 2026 16:26
@Snapex2409 Snapex2409 changed the title Moved preCICE coupling to CouplingHandler Refactor preCICE and domain decomposition handling Jun 7, 2026
@Snapex2409 Snapex2409 marked this pull request as ready for review June 7, 2026 11:49
@Snapex2409 Snapex2409 requested a review from IshaanDesai June 7, 2026 11:49
@IshaanDesai IshaanDesai added the enhancement Enchance existing functionality label Jun 7, 2026

@IshaanDesai IshaanDesai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot for this. The new design is a significant improvement. I have some suggestions and also some questions.

Comment thread micro_manager/tools/coupling.py Outdated
Comment thread micro_manager/tools/coupling.py
Comment thread micro_manager/tools/coupling.py Outdated
Comment thread micro_manager/tools/coupling.py Outdated
Comment thread micro_manager/tools/coupling.py
Comment thread micro_manager/tools/coupling.py
Comment thread micro_manager/tools/profiling.py Outdated
Comment thread micro_manager/tools/profiling.py Outdated
Comment thread micro_manager/micro_manager.py
Snapex2409 and others added 2 commits June 19, 2026 21:34
Co-authored-by: Ishaan Desai <ishaandesai@gmail.com>
@Snapex2409

Copy link
Copy Markdown
Collaborator Author

Incorporated the requested changes, should be ready to merge now.

@Snapex2409 Snapex2409 requested a review from IshaanDesai June 19, 2026 19:48
@Snapex2409 Snapex2409 merged commit d816445 into develop Jun 20, 2026
11 checks passed
@Snapex2409 Snapex2409 deleted the refactor-coupling branch June 20, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enchance existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants