Function deepmd::buildSkinTopology#
Defined in File graph_assembly.h
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 fromrow_centerswhen present; a neighbour outside the extended set is dropped; andfold_to_localselects 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.