namespace seams::domain#

Overview#

namespace domain {
 
// typedefs
 
typedef molSys::PointCloud<molSys::Point<double>, double> Cloud;
 
// structs
 
struct RingPhases;
struct RingSummary;
struct Share;
 
// global variables
 
int kRingHaloHalf = 2;
int kWorkNeigh = 1;
int kWorkChill = 2;
int kWorkQ6 = 3;
int kWorkRings = 4;
 
// global functions
 
RingSummary summarize(const std::vector<std::vector<int>>& ringList, int nAtoms, int maxDepth);
std::uint64_t hilbertKey(std::uint32_t x, std::uint32_t y, std::uint32_t z, int bits);
int ringHaloBonds(int ringSize);
int ringHops(int maxDepth);
int ringRowHops(int maxDepth);
Share decompose(const Cloud& cloud, int rank, int nRanks, double halo);
std::vector<int> haloRanks(const Share& share);
void markSources(const Cloud& cloud, const Share& share, double inner, std::vector<char>& source);
Cloud subCloud(const Cloud& cloud, const std::vector<int>& atoms);
std::vector<std::vector<int>> rings(const Cloud& cloud, double cutoff, int maxDepth, int rank, int nRanks);
const std::vector<std::vector<int>>& ownedRings(const Cloud& local, double cutoff, int maxDepth, const std::vector<char>& owned);
std::vector<std::vector<int>> ringsFromRows(const std::vector<int>& frame, const std::vector<std::vector<int>>& neigh, const std::vector<int>& sources, int maxDepth);
RingPhases lastRingPhases();
 
} // namespace domain

Detailed Documentation#

Global Variables#

int kRingHaloHalf = 2

Bonds of ghost skin around an owned atom. A primitive ring of length at most ringSize lies in the closed ball of radius floor(ringSize/2) about any of its members (formal/Formal/Halo.lean, primitive_ring_subset_ball), so this many bonds hold the ring and any shortcut the primitivity test can see.

int kWorkNeigh = 1

Tags for the measured cell weights. Zero keeps the point-count cut.

Global Functions#

RingSummary summarize(const std::vector<std::vector<int>>& ringList, int nAtoms, int maxDepth)

The summary of ringList over a frame of nAtoms atoms.

std::uint64_t hilbertKey(std::uint32_t x, std::uint32_t y, std::uint32_t z, int bits)

Position of cell (x, y, z) along the Hilbert curve over a 2^bits grid.

int ringHops(int maxDepth)

Cutoffs of coordinates a rank needs when it builds every neighbour row itself. One bond is at most one cutoff, so the coordinate skin is ringHaloBonds() cutoffs.

int ringRowHops(int maxDepth)

Cutoffs of neighbour rows the ring search reads past the owned block. The coordinate halo on the distributed path is one cutoff; rows out to this reach are computed by their owners and exchanged. Edges that leave the reach are dropped, which is the graph a coordinate halo of this many cutoffs would have built.

Share decompose(const Cloud& cloud, int rank, int nRanks, double halo)

The atoms rank rank of nRanks owns, and every atom in a cell painted within halo of an owned cell. Without a periodic box rank 0 owns every atom.

std::vector<int> haloRanks(const Share& share)

Ranks that own a halo atom of share, sorted, without this rank. The relation is symmetric: a cell within halo of both sides is listed by each owner.

void markSources(const Cloud& cloud, const Share& share, double inner, std::vector<char>& source)

One where a local atom is owned or lies within inner of the owned block. inner below zero marks only the owned atoms.

Cloud subCloud(const Cloud& cloud, const std::vector<int>& atoms)

The listed atoms of cloud, in that order, in the same box.

std::vector<std::vector<int>> rings(const Cloud& cloud, double cutoff, int maxDepth, int rank, int nRanks)

Primitive rings of the cutoff graph up to maxDepth members whose lowest-indexed member rank rank owns, by frame index, as primitive::ringNetwork lists them for the graph with ascending rows. Each rank needs only its share, and the ranks’ rings partition the frame’s.

const std::vector<std::vector<int>>& ownedRings(const Cloud& local, double cutoff, int maxDepth, const std::vector<char>& owned)

Rings of a cloud that is already one share, in share order. owned selects the sources. Member indices are local.

std::vector<std::vector<int>> ringsFromRows(const std::vector<int>& frame, const std::vector<std::vector<int>>& neigh, const std::vector<int>& sources, int maxDepth)

Primitive rings from neighbour rows already in hand. frame [i] is the frame index of a vertex whose neighbours are neigh [i], also frame indices. A neighbour that is not one of frame is dropped. sources lists the frames that may enumerate a ring. Members in the result are frame indices.