version 1.24 | version 1.25 |
---|
| |
} | } |
| |
// create the atom map if needed | // create the atom map if needed |
int const n_all_atoms = Node::Object()->molecule->numAtoms; | size_t const n_all_atoms = Node::Object()->molecule->numAtoms; |
if (atoms_map.size() != n_all_atoms) { | if (atoms_map.size() != n_all_atoms) { |
atoms_map.resize(n_all_atoms); | atoms_map.resize(n_all_atoms); |
atoms_map.assign(n_all_atoms, -1); | atoms_map.assign(n_all_atoms, -1); |
| |
} | } |
| |
// if new atomic positions or forces have been communicated by other GlobalMasters, add them to the atom map | // if new atomic positions or forces have been communicated by other GlobalMasters, add them to the atom map |
if ((atoms_ids.size() < (getAtomIdEnd() - getAtomIdBegin())) || | if ((int(atoms_ids.size()) < (getAtomIdEnd() - getAtomIdBegin())) || |
(atoms_ids.size() < (getForceIdEnd() - getForceIdBegin()))) { | (int(atoms_ids.size()) < (getForceIdEnd() - getForceIdBegin()))) { |
update_atoms_map(getAtomIdBegin(), getAtomIdEnd()); | update_atoms_map(getAtomIdBegin(), getAtomIdEnd()); |
update_atoms_map(getForceIdBegin(), getForceIdEnd()); | update_atoms_map(getForceIdBegin(), getForceIdEnd()); |
} | } |