Remove preprocessor usage for atomInfo
[alexxy/gromacs.git] / src / gromacs / domdec / partition.cpp
index dc826b55e73009d3f2aea6ba814caf40494ab728..cbf0fe493f1a49a2c317f81862786aad4117bc84 100644 (file)
@@ -479,7 +479,7 @@ static void dd_set_atominfo(gmx::ArrayRef<const int> index_gl, int cg0, int cg1,
 {
     if (fr != nullptr)
     {
-        gmx::ArrayRef<AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
+        gmx::ArrayRef<gmx::AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
                 fr->atomInfoForEachMoleculeBlock;
         gmx::ArrayRef<int> atomInfo = fr->atomInfo;
 
@@ -1335,16 +1335,16 @@ void set_dd_dlb_max_cutoff(t_commrec* cr, real cutoff)
 }
 
 //! Merge atom buffers.
-static void merge_cg_buffers(int                                        ncell,
-                             gmx_domdec_comm_dim_t*                     cd,
-                             int                                        pulse,
-                             int*                                       ncg_cell,
-                             gmx::ArrayRef<int>                         index_gl,
-                             const int*                                 recv_i,
-                             gmx::ArrayRef<gmx::RVec>                   x,
-                             gmx::ArrayRef<const gmx::RVec>             recv_vr,
-                             gmx::ArrayRef<AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock,
-                             gmx::ArrayRef<int>                         atomInfo)
+static void merge_cg_buffers(int                                             ncell,
+                             gmx_domdec_comm_dim_t*                          cd,
+                             int                                             pulse,
+                             int*                                            ncg_cell,
+                             gmx::ArrayRef<int>                              index_gl,
+                             const int*                                      recv_i,
+                             gmx::ArrayRef<gmx::RVec>                        x,
+                             gmx::ArrayRef<const gmx::RVec>                  recv_vr,
+                             gmx::ArrayRef<gmx::AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock,
+                             gmx::ArrayRef<int>                              atomInfo)
 {
     gmx_domdec_ind_t *ind, *ind_p;
     int               p, cell, c, cg, cg0, cg1, cg_gl;
@@ -1778,7 +1778,7 @@ static void get_zone_pulse_groups(gmx_domdec_t*                  dd,
         if (r2 < r_comm2
             || (bDistBonded && ((bDistMB && rb2 < r_bcomm2) || (bDist2B && r2 < r_bcomm2))
                 && (!bBondComm
-                    || (GET_CGINFO_BOND_INTER(atomInfo[cg])
+                    || ((atomInfo[cg] & gmx::sc_atomInfo_BondCommunication)
                         && missing_link(*comm->bondedLinks, globalAtomGroupIndices[cg], *dd->ga2la)))))
         {
             /* Store the local and global atom group indices and position */
@@ -1905,7 +1905,7 @@ static void setup_dd_communication(gmx_domdec_t* dd, matrix box, gmx_ddbox_t* dd
     }
 
     zone_cg_range = zones->cg_range.data();
-    gmx::ArrayRef<AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
+    gmx::ArrayRef<gmx::AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
             fr->atomInfoForEachMoleculeBlock;
 
     zone_cg_range[0]   = 0;