#include <DataManager.h>
Public Member Functions | |
DataManager (const CkArrayID &treePieceID) | |
DataManager (CkMigrateMessage *) | |
void | startLocalWalk () |
void | resumeRemoteChunk () |
void | clearInstrument (CkCallback const &cb) |
void | acceptResponsibleIndex (const int *responsible, const int n, const CkCallback &cb) |
void | acceptFinalKeys (const SFC::Key *keys, const int *responsible, uint64_t *bins, const int n, const CkCallback &cb) |
void | pup (PUP::er &p) |
void | notifyPresence (Tree::GenericTreeNode *root, TreePiece *treePiece) |
Collect roots of treepieces on this node. More... | |
void | clearRegisteredPieces (const CkCallback &cb) |
Clear registeredTreePieces on this node. | |
void | combineLocalTrees (CkReductionMsg *msg) |
Build a local tree inside the node. More... | |
void | getChunks (int &num, Tree::NodeKey *&roots) |
return the number of chunks and the roots of the remote walk subtrees. More... | |
Tree::GenericTreeNode * | chunkRootToNode (const Tree::NodeKey k) |
Tree::GenericTreeNode * | getRoot () |
void | initCooling (double dGmPerCcUnit, double dComovingGmPerCcUnit, double dErgPerGmUnit, double dSecUnit, double dKpcUnit, COOLPARAM inParam, const CkCallback &cb) |
void | initStarLog (std::string _fileName, const CkCallback &cb) |
void | dmCoolTableRead (double *dTableData, int nData, const CkCallback &cb) |
void | CoolingSetTime (double z, double dTime, const CkCallback &cb) |
void | SetStarCM (double dCenterOfMass[4], const CkCallback &cb) |
DataManager::SetStarCM saves the total mass and center of mass of the star(s) to the COOL struct Cool, making them available to the cool particles. More... | |
void | memoryStats (const CkCallback &cb) |
void | resetReadOnly (Parameters param, const CkCallback &cb) |
Static Public Member Functions | |
static Tree::GenericTreeNode * | pickNodeFromMergeList (int n, GenericTreeNode **gtn, int &nUnresolved, int &pickedIndex) |
Pick a node out of equivalent nodes on different TreePieces. If one of the nodes is internal to a TreePiece, return that one. Otherwise pick from among the others. More... | |
Public Attributes | |
COOL * | Cool |
StarLog * | starLog |
log of star formation events. More... | |
CmiNodeLock | lockStarLog |
Lock for accessing starlog from TreePieces. | |
Protected Attributes | |
std::vector< SFC::Key > | boundaryKeys |
The array of splitter keys for the sort. | |
std::vector< int > | responsibleIndex |
An array identifying which chare is responsible for each interval of keys. | |
std::vector< int > | particleCounts |
An array with how many particles are held by each TreePiece when sorted. | |
CkVec< TreePieceDescriptor > | registeredTreePieces |
A list of roots of the TreePieces in this node. | |
Tree::GenericTreeNode * | root |
The root of the combined trees. | |
CkVec< GenericTreeNode * > | nodeTable |
int | oldNumChunks |
Number of chunks in which the tree was splitted during last combine operation. | |
Tree::NodeKey * | chunkRoots |
Nodes currently used as roots for remote computation. | |
Tree::NodeLookupType | chunkRootTable |
Lookup table for the chunkRoots. | |
Friends | |
class | TreePiece |
class | OctTreeBuildPhaseIWorker |
The DataManager is used to store information that all TreePieces will need, but will not modify. The first example is the list of splitter keys and the responsible chare for each interval. This data is given to the DataManager by the Sorter. The DataManager then instructs all the TreePieces on its node to evaluate the boundary keys.
void DataManager::acceptFinalKeys | ( | const SFC::Key * | keys, |
const int * | responsible, | ||
uint64_t * | bins, | ||
const int | n, | ||
const CkCallback & | cb | ||
) |
Called by the Sorter, I save these final keys and the list of which TreePiece is responsible for which interval. This routine then calls TreePiece::unshuffleParticles to move the particles around.
keys | vector of boundary keys |
responsible | vector of which piece is responsible for which interval |
bins | number of particles in each interval. |
void DataManager::acceptResponsibleIndex | ( | const int * | responsible, |
const int | n, | ||
const CkCallback & | cb | ||
) |
void DataManager::combineLocalTrees | ( | CkReductionMsg * | msg | ) |
Build a local tree inside the node.
This will be an exact superset of all the trees in this processor. Only the minimum number of nodes is duplicated. The actual treebuilding is in a call to DataManager::buildProcessorTree.
msg | contains the callback for when we are done. |
void DataManager::getChunks | ( | int & | num, |
Tree::NodeKey *& | roots | ||
) |
return the number of chunks and the roots of the remote walk subtrees.
num | number of chunks (returned) |
roots | roots of the chunks (returned) The remote walk is broken up into "chunks", which are subtrees. This method returns the number of these chunks and the roots of the corresponding subtrees. |
void DataManager::initCooling | ( | double | dGmPerCcUnit, |
double | dComovingGmPerCcUnit, | ||
double | dErgPerGmUnit, | ||
double | dSecUnit, | ||
double | dKpcUnit, | ||
COOLPARAM | inParam, | ||
const CkCallback & | cb | ||
) |
Initialized Cooling Read-only data on the DataManager, which doesn't migrate.
void DataManager::notifyPresence | ( | Tree::GenericTreeNode * | root, |
TreePiece * | treePiece | ||
) |
Collect roots of treepieces on this node.
The roots are stored in registeredChares to be used by TreePiece combineLocalTrees.
|
static |
Pick a node out of equivalent nodes on different TreePieces. If one of the nodes is internal to a TreePiece, return that one. Otherwise pick from among the others.
n | Number of equivalent nodes. |
gtn | Array of equivalent nodes. |
nUnresolved | Count of boundary nodes in the array (returned). |
pickedIndex | Index of picked Node. |
void DataManager::SetStarCM | ( | double | dCenterOfMass[4], |
const CkCallback & | cb | ||
) |
DataManager::SetStarCM saves the total mass and center of mass of the star(s) to the COOL struct Cool, making them available to the cool particles.
dCenterOfMass | Array(length 4) which contains the star(s) center of mass as the first 3 entries and the total star mass as the final entry |
cb | Callback |
|
protected |
Table for nodes created by the DataManager to combine trees. Kept track of here so we can delete them when done.
StarLog* DataManager::starLog |
log of star formation events.
Star formation events are stored on the data manager since there is no need to migrate them with the TreePiece.