Only use const ref for mtop and inputrec in domdec
[alexxy/gromacs.git] / src / gromacs / domdec / mdsetup.cpp
index 6c76374521295cd75026894b3a1ed93f55a02163..9db54f0c3395f5825a722994bc2752ab6f43c0bf 100644 (file)
@@ -64,7 +64,7 @@ namespace gmx
  * for initialization and atom-data setup.
  */
 void mdAlgorithmsSetupAtomData(const t_commrec*     cr,
-                               const t_inputrec*    ir,
+                               const t_inputrec&    inputrec,
                                const gmx_mtop_t&    top_global,
                                gmx_localtop_t*      top,
                                t_forcerec*          fr,
@@ -99,7 +99,7 @@ void mdAlgorithmsSetupAtomData(const t_commrec*     cr,
     }
 
     atoms2md(&top_global,
-             ir,
+             &inputrec,
              numAtomIndex,
              usingDomDec ? cr->dd->globalAtomIndices : std::vector<int>(),
              numHomeAtoms,
@@ -112,7 +112,7 @@ void mdAlgorithmsSetupAtomData(const t_commrec*     cr,
     }
     else
     {
-        gmx_mtop_generate_local_top(top_global, top, ir->efep != FreeEnergyPerturbationType::No);
+        gmx_mtop_generate_local_top(top_global, top, inputrec.efep != FreeEnergyPerturbationType::No);
     }
 
     if (vsite)