Make LocalTopologyChecker class and hide implementation details
[alexxy/gromacs.git] / src / gromacs / mdrun / rerun.cpp
index d0783eb77508bae6f6bbf9cbd1f1e6c7d9c64967..407c0190f6daf49aeacbfee850c1ac53e22d805c 100644 (file)
@@ -387,7 +387,7 @@ void gmx::LegacySimulator::do_rerun()
 
     {
         int cglo_flags = CGLO_GSTAT;
-        if (DOMAINDECOMP(cr) && shouldCheckNumberOfBondedInteractions(*cr->dd))
+        if (DOMAINDECOMP(cr) && dd_localTopologyChecker(*cr->dd).shouldCheckNumberOfBondedInteractions())
         {
             cglo_flags |= CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS;
         }
@@ -417,8 +417,8 @@ void gmx::LegacySimulator::do_rerun()
                         cglo_flags);
         if (DOMAINDECOMP(cr))
         {
-            checkNumberOfBondedInteractions(
-                    mdlog, cr, top_global, &top, makeConstArrayRef(state->x), state->box);
+            dd_localTopologyChecker(cr->dd)->checkNumberOfBondedInteractions(
+                    &top, makeConstArrayRef(state->x), state->box);
         }
     }
 
@@ -742,7 +742,7 @@ void gmx::LegacySimulator::do_rerun()
             SimulationSignaller signaller(&signals, cr, ms, doInterSimSignal, doIntraSimSignal);
 
             int cglo_flags = CGLO_GSTAT | CGLO_ENERGY;
-            if (DOMAINDECOMP(cr) && shouldCheckNumberOfBondedInteractions(*cr->dd))
+            if (DOMAINDECOMP(cr) && dd_localTopologyChecker(*cr->dd).shouldCheckNumberOfBondedInteractions())
             {
                 cglo_flags |= CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS;
             }
@@ -770,8 +770,8 @@ void gmx::LegacySimulator::do_rerun()
                             cglo_flags);
             if (DOMAINDECOMP(cr))
             {
-                checkNumberOfBondedInteractions(
-                        mdlog, cr, top_global, &top, makeConstArrayRef(state->x), state->box);
+                dd_localTopologyChecker(cr->dd)->checkNumberOfBondedInteractions(
+                        &top, makeConstArrayRef(state->x), state->box);
             }
         }