changa  3.5
 All Classes Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
DataManager Class Reference

#include <DataManager.h>

Inheritance diagram for DataManager:

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::GenericTreeNodechunkRootToNode (const Tree::NodeKey k)
 
Tree::GenericTreeNodegetRoot ()
 
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::GenericTreeNodepickNodeFromMergeList (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

COOLCool
 
StarLogstarLog
 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< TreePieceDescriptorregisteredTreePieces
 A list of roots of the TreePieces in this node.
 
Tree::GenericTreeNoderoot
 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
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
keysvector of boundary keys
responsiblevector of which piece is responsible for which interval
binsnumber of particles in each interval.
void DataManager::acceptResponsibleIndex ( const int *  responsible,
const int  n,
const CkCallback &  cb 
)

Called by ORB Sorter, save the list of which TreePiece is responsible for which interval.

Fill in responsibleIndex after ORB decomposition

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.

Parameters
msgcontains 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.

Parameters
numnumber of chunks (returned)
rootsroots 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.

Tree::GenericTreeNode * DataManager::pickNodeFromMergeList ( int  n,
GenericTreeNode **  gtn,
int &  nUnresolved,
int &  pickedIndex 
)
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.

Parameters
nNumber of equivalent nodes.
gtnArray of equivalent nodes.
nUnresolvedCount of boundary nodes in the array (returned).
pickedIndexIndex 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.

Parameters
dCenterOfMassArray(length 4) which contains the star(s) center of mass as the first 3 entries and the total star mass as the final entry
cbCallback

Member Data Documentation

CkVec<GenericTreeNode *> DataManager::nodeTable
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.


The documentation for this class was generated from the following files: