Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR generalizes the MPCD cell list code to allow triclinic simulation boxes. The cells are aligned to the lattice vectors rather than being a simple cubic lattice. This means that the MPCD cells can be skewed by a tilt factor as well as orthorhombic non-cubic.
Benchmark
SRD solvent with density 10, collision angle 130, and kT = 1 in cube with L = 120.
CPU: 2x Intel Xeon Gold 6248R = 48 cores (Auburn University Easley)
GPU: 1x A100 (NCSA Delta GPU)
No change on GPU (A100 is compute hungry), and only a small penalty on CPU. This performance is acceptable to me in order to enable more flexibility.
Motivation and context
This generalization of the code is necessary to enable simulation methods that deform the box, e.g., Lees-Edwards shear flow implemented using the Lagrangian rhomboid method. It also puts less restrictions on the user to make their cells exactly cubic.
Resolves #773
How has this been tested?
Existing C++ tests of the cell list have been generalized to triclinic boxes. There were some cases that no longer worked as originally written because of floating-point rounding. I am also planning a subsequent PR that will change the way MPCD does domain decomposition so that there will be no cells crossing boundaries anymore. Hence, these cases should become irrelevant.
Checklist:
sphinx-doc/credits.rst
) in the pull request source branch.CHANGELOG.rst
following the established format.