Enable TPI with the Verlet cut-off scheme
[alexxy/gromacs.git] / src / gromacs / nbnxm / gridset.h
index 38d9650e4f1fc49afd4eb12de57f4f97f23a4180..142a1f28b4126b53a18e6638c59d5dc197369734 100644 (file)
@@ -73,6 +73,12 @@ namespace Nbnxm
 
 /*! \internal
  * \brief Holds a set of search grids for the local + non-local DD zones
+ *
+ * The are three different possible setups:
+ * - a single grid, this is the standard case without domain decomposition
+ * - one grid for each domain decomposition zone
+ * - with test particle insertion there are two grids, one for the system
+ *   to insert in and one for the molecule that is inserted
  */
 class GridSet
 {
@@ -84,11 +90,14 @@ class GridSet
         {
             //! Constructor, without DD \p numDDCells and \p ddZones should be nullptr
             DomainSetup(int                       ePBC,
+                        bool                      doTestParticleInsertion,
                         const ivec               *numDDCells,
                         const gmx_domdec_zones_t *ddZones);
 
             //! The type of PBC
             int                       ePBC;
+            //! Tells whether we are doing test-particle insertion
+            bool                      doTestParticleInsertion;
             //! Are there multiple domains?
             bool                      haveMultipleDomains;
             //! Are there multiple domains along each dimension?
@@ -99,6 +108,7 @@ class GridSet
 
         //! Constructs a grid set for 1 or multiple DD zones, when numDDCells!=nullptr
         GridSet(int                       ePBC,
+                bool                      doTestParticleInsertion,
                 const ivec               *numDDCells,
                 const gmx_domdec_zones_t *ddZones,
                 PairlistType              pairlistType,
@@ -106,9 +116,9 @@ class GridSet
                 int                       numThreads,
                 gmx::PinningPolicy        pinningPolicy);
 
-        //! Puts the atoms in \p ddZone on the grid and copies the coordinates to \p nbat
+        //! Puts the atoms on the grid with index \p gridIndex and copies the coordinates to \p nbat
         void putOnGrid(const matrix                    box,
-                       int                             ddZone,
+                       int                             gridIndex,
                        const rvec                      lowerCorner,
                        const rvec                      upperCorner,
                        const gmx::UpdateGroupsCog     *updateGroupsCog,