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

WIP: Introduce hybrid ParticleDecomposition #4351

Closed
RudolfWeeber opened this issue Sep 18, 2021 · 0 comments · Fixed by #4373
Closed

WIP: Introduce hybrid ParticleDecomposition #4351

RudolfWeeber opened this issue Sep 18, 2021 · 0 comments · Fixed by #4373

Comments

@RudolfWeeber
Copy link
Contributor

RudolfWeeber commented Sep 18, 2021

Implement a ParticleDecomposition which is, in turn, backed by two ParticleDecompositions optimized for different respective particle sizes.

This will increase the efficientcy for short range calculations for systems with few very large and much more small particles.
The reason is that even a single large particle forces a larger cell size on the entire system. Due to that large cell size, a large number of non-interacting pairs of small particles are visited during the short range calculation.

Sketch of possible design

Implmenet a class HybridDecomposition, inheriting from ParticleDecomposition

The HybridDecompositoin

  • Instances two ParticleDecompositions, of which one is DomainDecomposition, the other probably n-square
  • Has a list of particle types to put in the n-square cell system.
  • local_cels and ghost_cells contain cells of both chiel decompositions
  • particle_to_cell() forward to particle_to_cell() of the child decompositoin depending on the particle's type
  • max_cut() and max_range(): unclear. Maybe type pair specific, or that of n-squre and manual override by user.
  • minimum_image_disitance(): Return {box_geo} for now, i.e. use minimum image sitance always (note: domain decomposition works with Euclidan, N-Square does not, but MI is always correct)
  • resort() calls resort on both children
  • exchange_ghot_comm, collect_ghost_force_comm(): Returns a communicator containing all the communications of both child decompositions

Takss of the constructor

  • Construct both child decompositions (probably domain decompoision first)
  • Create the local_cells and ghost_cells spans (in private member vars) containing thre respectige contents of both the child decompositions
  • Same for both ghost communicators (note: Ghost communicator=list of communication tasks to achieve a purpose. GhostCommunication: individual communication, e.g. cend cell x to y)
  • Add the local cell of the n-square decomposition as a neighbor to all cells in the domain decompoistion

Destructor

  • Destructs both child cecompoistions

Distance calculation

In the initial implementation, we use minimum image distance everywhere. In a later stage, the decision between eucllidian and MI distance ccan be made in the linked_cell loop depending on the cells involved.

Cut-off management

When all large particles are in the N-Square part of the atom decomposition, their size can be ignored in the cutoff calculation of the n-square cell system.
In the experimental phase, we let the user chose this. In the final implementation, the cutoff calculation routines will need the option to calc the cutoff disregarding specified particle types.

@kodiakhq kodiakhq bot closed this as completed in #4373 May 11, 2022
kodiakhq bot added a commit that referenced this issue May 11, 2022
Fixes #4351 

Description of changes:
- Implement HybridDecomposition
- Add tests and doc
- Make DomainDecomposition `class` (instead of `struct`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant