t_vcm* vcm,
int nsig,
real* sig,
- int* totalNumberOfBondedInteractions,
bool bSumEkinhOld,
int flags)
/* instead of current system, gmx_booleans for summing virial, kinetic energy, and other terms */
if (checkNumberOfBondedInteractions)
{
- nb = cr->dd->nbonded_local;
+ GMX_RELEASE_ASSERT(DOMAINDECOMP(cr),
+ "No need to check number of bonded interactions when not using domain "
+ "decomposition");
+ nb = numBondedInteractions(*cr->dd);
inb = add_bind(rb, 1, &nb);
}
if (nsig > 0)
if (checkNumberOfBondedInteractions)
{
extract_bind(rb, inb, 1, &nb);
- *totalNumberOfBondedInteractions = gmx::roundToInt(nb);
+ GMX_RELEASE_ASSERT(DOMAINDECOMP(cr),
+ "No need to check number of bonded interactions when not using domain "
+ "decomposition");
+ setNumberOfBondedInteractionsOverAllDomains(*cr->dd, gmx::roundToInt(nb));
}
if (nsig > 0)