NAMD
Public Member Functions | List of all members
PmePencilXYMap Class Reference

#include <PmeSolver.h>

Inheritance diagram for PmePencilXYMap:

Public Member Functions

 PmePencilXYMap (const std::vector< int > &pes)
 
int registerArray (CkArrayIndex &numElements, CkArrayID aid)
 
virtual int procNum (int, const CkArrayIndex &idx)
 
virtual void populateInitial (int, CkArrayOptions &, void *msg, CkArrMgr *mgr)
 

Detailed Description

Definition at line 70 of file PmeSolver.h.

Constructor & Destructor Documentation

PmePencilXYMap::PmePencilXYMap ( const std::vector< int > &  pes)
inline

Definition at line 72 of file PmeSolver.h.

72 : pes(pes) {}

Member Function Documentation

virtual void PmePencilXYMap::populateInitial ( int  ,
CkArrayOptions &  ,
void msg,
CkArrMgr *  mgr 
)
inlinevirtual

Definition at line 82 of file PmeSolver.h.

References NAMD_bug(), and procNum().

82  {
83  for (int i=0;i < pes.size();i++) {
84  if (pes[i] == CkMyPe()) {
85  if ( msg == NULL ) NAMD_bug("PmePencilXYMap::populateInitial, multiple pencils on a pe?");
86  CkArrayIndex3D ai(0,0,0);
87  ai.data()[2] = i;
88  if ( procNum(0,ai) != CkMyPe() ) NAMD_bug("PmePencilXYMap::populateInitial, map is inconsistent");
89  mgr->insertInitial(ai, msg);
90  msg = NULL;
91  }
92  }
93  mgr->doneInserting();
94  if (msg != NULL) CkFreeMsg(msg);
95  }
void NAMD_bug(const char *err_msg)
Definition: common.C:123
virtual int procNum(int, const CkArrayIndex &idx)
Definition: PmeSolver.h:76
virtual int PmePencilXYMap::procNum ( int  ,
const CkArrayIndex &  idx 
)
inlinevirtual

Definition at line 76 of file PmeSolver.h.

References NAMD_bug().

Referenced by populateInitial().

76  {
77  int ind = idx.data()[2];
78  if (ind < 0 || ind >= pes.size())
79  NAMD_bug("PmePencilXYMap::procNum, index out of bounds");
80  return pes[ind];
81  }
void NAMD_bug(const char *err_msg)
Definition: common.C:123
int PmePencilXYMap::registerArray ( CkArrayIndex &  numElements,
CkArrayID  aid 
)
inline

Definition at line 73 of file PmeSolver.h.

73  {
74  return 0;
75  }

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