Loading...
Searching...
No Matches
domain.hpp
Go to the documentation of this file.
1#ifndef SEAMS_DOMAIN_HPP_
2#define SEAMS_DOMAIN_HPP_
3
4#include <cstdint>
5#include <vector>
6
7#include <mol_sys.hpp>
8
9#ifdef SEAMS_HAS_MPI
10#include <mpi.h>
11#endif
12
24
25namespace seams::domain {
26
28
30struct Share {
31 std::vector<int> local;
32 std::vector<char> owned;
33 std::vector<int> owner;
34};
35
39 std::vector<long long> sizeCount;
42 std::vector<int> atomType;
43};
44
46RingSummary summarize(const std::vector<std::vector<int>> &ringList,
47 int nAtoms, int maxDepth);
48
50std::uint64_t hilbertKey(std::uint32_t x, std::uint32_t y, std::uint32_t z,
51 int bits);
52
55Share decompose(const Cloud &cloud, int rank, int nRanks, double halo);
56
58Cloud subCloud(const Cloud &cloud, const std::vector<int> &atoms);
59
64std::vector<std::vector<int>> rings(const Cloud &cloud, double cutoff,
65 int maxDepth, int rank, int nRanks);
66
67#ifdef SEAMS_HAS_MPI
73std::vector<std::vector<int>> gatherRings(const Cloud &cloud, double cutoff,
74 int maxDepth, MPI_Comm comm);
75
83RingSummary reduceRings(const Cloud &cloud, double cutoff, int maxDepth,
84 MPI_Comm comm, int root = 0);
85#endif
86
87} // namespace seams::domain
88
89#endif // SEAMS_DOMAIN_HPP_
The main molecular system handler.
RingSummary summarize(const std::vector< std::vector< int > > &ringList, int nAtoms, int maxDepth)
The summary of ringList over a frame of nAtoms atoms.
Cloud subCloud(const Cloud &cloud, const std::vector< int > &atoms)
The listed atoms of cloud, in that order, in the same box.
Share decompose(const Cloud &cloud, int rank, int nRanks, double halo)
molSys::PointCloud< molSys::Point< double >, double > Cloud
Definition domain.hpp:27
std::vector< std::vector< int > > rings(const Cloud &cloud, double cutoff, int maxDepth, int rank, int nRanks)
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.
This contains a collection of points; contains information for a particular frame.
Definition mol_sys.hpp:173
What the ring analyses read off a frame's primitive rings.
Definition domain.hpp:37
std::vector< long long > sizeCount
Rings of each size, indexed by member count, 0 through maxDepth.
Definition domain.hpp:39
std::vector< int > atomType
Definition domain.hpp:42
One rank's share of a frame.
Definition domain.hpp:30
std::vector< char > owned
nonzero where local[k] belongs to this rank
Definition domain.hpp:32
std::vector< int > owner
rank owning local[k]
Definition domain.hpp:33
std::vector< int > local
owned and halo atoms by frame index, ascending
Definition domain.hpp:31