{
bool stateHasVelocities;
// Local state only becomes valid now.
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
dd_init_local_state(*cr->dd, globalState, localState);
stateHasVelocities = ((localState->flags & enumValueToBitMask(StateEntry::V)) != 0);
changePinningPolicy(&x_, gmx::PinningPolicy::PinnedIfSupported);
}
- if (DOMAINDECOMP(cr) && MASTER(cr))
+ if (haveDDAtomOrdering(*cr) && MASTER(cr))
{
xGlobal_.resizeWithPadding(totalNumAtoms_);
previousXGlobal_.resizeWithPadding(totalNumAtoms_);
void StatePropagatorData::Element::saveCheckpointState(std::optional<WriteCheckpointData> checkpointData,
const t_commrec* cr)
{
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
// Collect state from all ranks into global vectors
dd_collect_vec(cr->dd,
}
// Copy data to global state to be distributed by DD at setup stage
- if (DOMAINDECOMP(cr) && MASTER(cr))
+ if (haveDDAtomOrdering(*cr) && MASTER(cr))
{
updateGlobalState(statePropagatorData_->globalState_,
statePropagatorData_->xGlobal_,
statePropagatorData_->cgGl_);
}
// Everything is local - copy global vectors to local ones
- if (!DOMAINDECOMP(cr))
+ if (!haveDDAtomOrdering(*cr))
{
statePropagatorData_->x_.resizeWithPadding(statePropagatorData_->totalNumAtoms_);
statePropagatorData_->v_.resizeWithPadding(statePropagatorData_->totalNumAtoms_);
GMX_ASSERT(localStateBackupValid_, "Final trajectory writing called, but no state saved.");
wallcycle_start(mdoutf_get_wcycle(outf), WallCycleCounter::Traj);
- if (DOMAINDECOMP(cr_))
+ if (haveDDAtomOrdering(*cr_))
{
auto globalXRef =
MASTER(cr_) ? statePropagatorData_->globalState_->x : gmx::ArrayRef<gmx::RVec>();