Function deepmd::buildSkinTopology

Function deepmd::buildSkinTopology#

Function Documentation#

inline SkinTopology deepmd::buildSkinTopology(const std::vector<std::vector<int>> &nlist, const std::vector<std::int64_t> &mapping, const int nloc, const int nall, const std::int64_t node_count, const std::vector<int> *row_centers, const bool fold_to_local)#

Build the cached skin topology from a host neighbor list.

Mirrors the contracts of createEdgeTensors: rows may be compacted, so a row’s center comes from row_centers when present; a neighbour outside the extended set is dropped; and fold_to_local selects between folding ghost sources onto their local owners (single-rank message passing) and indexing the extended atoms directly (multi-rank, where ghost features are exchanged instead).

Parameters:
  • nlist – Neighbor-list rows holding extended indices.

  • mapping – Extended-to-local owner map, length nall.

  • nloc – Number of local atoms.

  • nall – Number of extended atoms.

  • node_count – Size of the graph’s node axis.

  • row_centers – Center atom of each row, or null when row i centers on i.

  • fold_to_local – Whether ghost sources fold onto their local owners.

Returns:

The destination-grouped skin topology.