Add InteractionDefinitions
[alexxy/gromacs.git] / src / gromacs / domdec / domdec_vsite.cpp
index f202863c2aaf5f288ed3ec32f7d2a458fbecb06a..7b8c8f903f6ffe7622df0bf8d6359b8b1d65ddf5 100644 (file)
@@ -103,7 +103,7 @@ void dd_clear_local_vsite_indices(gmx_domdec_t* dd)
     }
 }
 
-int dd_make_local_vsites(gmx_domdec_t* dd, int at_start, t_ilist* lil)
+int dd_make_local_vsites(gmx_domdec_t* dd, int at_start, gmx::ArrayRef<InteractionList> lil)
 {
     std::vector<int>&    ireq         = dd->vsite_requestedGlobalAtomIndices;
     gmx::HashedMap<int>* ga2la_specat = dd->ga2la_vsite;
@@ -114,11 +114,11 @@ int dd_make_local_vsites(gmx_domdec_t* dd, int at_start, t_ilist* lil)
     {
         if (interaction_function[ftype].flags & IF_VSITE)
         {
-            const int      nral = NRAL(ftype);
-            const t_ilist& lilf = lil[ftype];
-            for (int i = 0; i < lilf.nr; i += 1 + nral)
+            const int              nral = NRAL(ftype);
+            const InteractionList& lilf = lil[ftype];
+            for (int i = 0; i < lilf.size(); i += 1 + nral)
             {
-                const t_iatom* iatoms = lilf.iatoms + i;
+                const int* iatoms = lilf.iatoms.data() + i;
                 /* Check if we have the other atoms */
                 for (int j = 1; j < 1 + nral; j++)
                 {
@@ -152,11 +152,11 @@ int dd_make_local_vsites(gmx_domdec_t* dd, int at_start, t_ilist* lil)
     {
         if (interaction_function[ftype].flags & IF_VSITE)
         {
-            const int nral = NRAL(ftype);
-            t_ilist&  lilf = lil[ftype];
-            for (int i = 0; i < lilf.nr; i += 1 + nral)
+            const int        nral = NRAL(ftype);
+            InteractionList& lilf = lil[ftype];
+            for (int i = 0; i < lilf.size(); i += 1 + nral)
             {
-                t_iatom* iatoms = lilf.iatoms + i;
+                t_iatom* iatoms = lilf.iatoms.data() + i;
                 for (int j = 1; j < 1 + nral; j++)
                 {
                     if (iatoms[j] < 0)