#include "gromacs/domdec/collect.h"
#include "gromacs/domdec/dlb.h"
#include "gromacs/domdec/dlbtiming.h"
-#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_network.h"
#include "gromacs/domdec/ga2la.h"
#include "gromacs/domdec/localatomsetmanager.h"
+#include "gromacs/domdec/localtopology.h"
#include "gromacs/domdec/localtopologychecker.h"
#include "gromacs/domdec/mdsetup.h"
#include "gromacs/domdec/nsgrid.h"
{
if (fr != nullptr)
{
- gmx::ArrayRef<AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
+ gmx::ArrayRef<gmx::AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
fr->atomInfoForEachMoleculeBlock;
- gmx::ArrayRef<int> atomInfo = fr->atomInfo;
+ gmx::ArrayRef<int64_t> atomInfo = fr->atomInfo;
for (int cg = cg0; cg < cg1; cg++)
{
if (!keepLocalAtomIndices)
{
/* Clear the whole list without the overhead of searching */
- ga2la.clear();
+ ga2la.clear(true);
}
else
{
}
//! 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<int64_t> atomInfo)
{
gmx_domdec_ind_t *ind, *ind_p;
int p, cell, c, cg, cg0, cg1, cg_gl;
gmx_bool bDist2B,
gmx_bool bDistMB,
gmx::ArrayRef<const gmx::RVec> coordinates,
- gmx::ArrayRef<const int> atomInfo,
+ gmx::ArrayRef<const int64_t> atomInfo,
std::vector<int>* localAtomGroups,
dd_comm_setup_work_t* work)
{
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 */
}
zone_cg_range = zones->cg_range.data();
- gmx::ArrayRef<AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
+ gmx::ArrayRef<gmx::AtomInfoWithinMoleculeBlock> atomInfoForEachMoleculeBlock =
fr->atomInfoForEachMoleculeBlock;
zone_cg_range[0] = 0;
/* Reorder the global cg index */
orderVector<int>(cgsort, dd->globalAtomGroupIndices, &sort->intBuffer);
/* Reorder the atom info */
- orderVector<int>(cgsort, fr->atomInfo, &sort->intBuffer);
+ orderVector<int64_t>(cgsort, fr->atomInfo, &sort->int64Buffer);
/* Set the home atom number */
dd->comm->atomRanges.setEnd(DDAtomRanges::Type::Home, dd->numHomeAtoms);
state_change_natoms(state_local, comm->atomRanges.numHomeAtoms());
/* Rebuild all the indices */
- dd->ga2la->clear();
+ dd->ga2la->clear(false);
ncgindex_set = 0;
wallcycle_sub_stop(wcycle, WallCycleSubCounter::DDGrid);
{
numPulses[dd->dim[i]] = comm->cd[i].numPulses();
}
- int numBondedInteractionsToReduce = dd_make_local_top(dd,
- &comm->zones,
+ int numBondedInteractionsToReduce = dd_make_local_top(*dd,
+ comm->zones,
dd->unitCellInfo.npbcdim,
state_local->box,
comm->cellsize_min,
fr,
state_local->x,
top_global,
+ fr->atomInfo,
top_local);
- scheduleCheckOfLocalTopology(dd, numBondedInteractionsToReduce);
+ dd->localTopologyChecker->scheduleCheckOfLocalTopology(numBondedInteractionsToReduce);
wallcycle_sub_stop(wcycle, WallCycleSubCounter::DDMakeTop);
n = dd_make_local_constraints(dd,
n,
top_global,
- fr->atomInfo.data(),
+ fr->atomInfo,
constr,
inputrec.nProjOrder,
top_local->idef.il);