21 static int maxNumChildren;
22 static int lgMaxNumChildren;
24 OctDecompNode() : children(NULL), nchildren(0), nparticles(0)
30 OctDecompNode *children;
35 void makeSubTree(
int refineLevel, CkVec<OctDecompNode*> *active);
36 int64_t buildCounts();
38 void combine(
int thresh, vector<NodeKey> &finalKeys, vector<uint64_t> &counts);
39 void getLeafNodes(CkVec<OctDecompNode*> *activeNodes);
64class Sorter :
public CBase_Sorter {
72 std::vector<int> chareIDs;
74 std::vector<int> availableChares;
87 std::vector<NodeKey> nodeKeys;
89 std::vector<uint64_t> binCounts;
90 std::vector<unsigned int> binCountsGas;
91 std::vector<unsigned int> binCountsStar;
95 std::vector<SFC::Key> keyBoundaries;
96 std::vector<uint64_t> accumulatedBinCounts;
98 std::vector<SFC::Key> splitters;
100 CkBitVector binsToSplit;
106 CProxy_DataManager dm;
108 CkCallback sortingCallback;
111 int joinThreshold, splitThreshold;
121 CkVec<OctDecompNode*> *activeNodes;
122 CkVec<OctDecompNode*> *tmpActiveNodes;
125 typedef struct DivData{
126 OrientedBox<float> boundingBox;
136 std::list<ORBData> orbData;
142 CkVec<NodeKey> nodesOpened;
144 void adjustSplitters();
145 bool refineOctSplitting(
int n, int64_t *count);
155 activeNodes =
new CkVec<OctDecompNode*>;
156 tmpActiveNodes =
new CkVec<OctDecompNode*>;
158 chareIDs.resize(numTreePieces, 1);
160 partial_sum(chareIDs.begin(), chareIDs.end(), chareIDs.begin());
162 Sorter(CkMigrateMessage* m) : CBase_Sorter(m) {
168 chareIDs.resize(numTreePieces, 1);
170 partial_sum(chareIDs.begin(), chareIDs.end(), chareIDs.begin());
183 void startSorting(
const CkGroupID& dataManagerID,
const double toler,
const CkCallback& cb,
bool decompose);
196 void readytoSendORB(CkReductionMsg* m);
KeyType NodeKey
This key is the identification of a node inside the global tree, and it is unique for the node....
Definition GenericTreeNode.h:35
void collectORBCounts(CkReductionMsg *m)
Collect particle counts from treepieces and send out new splits.
Definition Sorter.cpp:194
void convertNodesToSplitters()
Definition Sorter.cpp:403
void doORBDecomposition(CkReductionMsg *m)
Start ORB decomposition.
Definition Sorter.cpp:28
void collectEvaluations(CkReductionMsg *m)
Collect the counts of particles in each domain.
Definition Sorter.cpp:466
void startSorting(const CkGroupID &dataManagerID, const double toler, const CkCallback &cb, bool decompose)
Overall start of domain decomposition.
Definition Sorter.cpp:265
void finishPhase(CkReductionMsg *m)
Definition Sorter.cpp:81
void collectEvaluationsSFC(CkReductionMsg *m)
Collect evaluations for the SFC domain decomposion.
Definition Sorter.cpp:803
SFC::Key * convertNodesToSplittersRefine(int num, NodeKey *keys)
Definition Sorter.cpp:433
void collectEvaluationsOct(CkReductionMsg *m)
Definition Sorter.cpp:493
Class to hold the Oct decomposition tree.
Definition Sorter.h:20
void makeSubTree(int refineLevel, CkVec< OctDecompNode * > *active)
Make a balanced subtree of OctDecompNode.
Definition Sorter.cpp:686