Struct SkinTopology#

Struct Documentation#

struct SkinTopology#

Destination-grouped skin topology, cached across neighbor rebuilds.

A molecular-dynamics host rebuilds its neighbor list every few tens of steps and reuses it in between, so the topology is cached while the geometry is not. The cached form is compressed-sparse-row over the graph’s node axis rather than a flat edge list, because the host list already groups its neighbours by center: keeping that grouping means the per-step assembly needs a prefix sum instead of a sort.

source_ext indexes the extended atoms and drives the geometry; source_node indexes the graph nodes, which for a single-rank folded graph is the local owner of the same atom. Both are 32-bit because a neighbor list that a host can hold has fewer than two billion atoms, and halving the index traffic matters for a pass whose arithmetic is three subtractions per edge.

Public Functions

inline bool empty() const#

Return whether a topology has been built.

Public Members

std::vector<std::int64_t> row_ptr#

Offsets into the edge arrays, one per node plus the total.

std::vector<std::int32_t> source_ext#

Extended index of each edge’s source atom.

std::vector<std::int32_t> source_node#

Node index of each edge’s source atom.

std::int64_t node_count = 0#

Number of nodes the row pointers span.