Function deepmd::remap_comm_sendlist

Function deepmd::remap_comm_sendlist#

Function Documentation#

void deepmd::remap_comm_sendlist(std::vector<std::vector<int>> &new_sendlist, std::vector<int> &new_sendnum, std::vector<int> &new_recvnum, const InputNlist &lmp_list, const std::vector<int> &fwd_map)#

Remap communication sendlist for message passing with NULL-type atoms.

When NULL-type (virtual) atoms are present, the original LAMMPS sendlist contains indices referring to virtual atoms that have been filtered out by select_real_atoms_coord. This function remaps those indices through fwd_map and independently recomputes recvnum using firstrecv.

Parameters:
  • new_sendlist[out] Remapped send lists per swap (vector of vectors).

  • new_sendnum[out] Number of atoms to send per swap after remapping.

  • new_recvnum[out] Number of atoms to receive per swap after remapping.

  • lmp_list[in] The LAMMPS neighbor list containing communication info.

  • fwd_map[in] Forward map from original atom index to real-atom index (-1 for virtual/NULL atoms).