PatchMgr Class Reference

#include <PatchMgr.h>

List of all members.

Public Member Functions

 PatchMgr ()
 ~PatchMgr ()
void createHomePatch (PatchID pid, FullAtomList &a)
void preCreateHomePatch (PatchID pid, int atomCnt)
void movePatch (PatchID, NodeID)
void sendMovePatches ()
void recvMovePatches (MovePatchesMsg *msg)
void sendAtoms (PatchID pid, FullAtomList &a)
void recvAtoms (MovePatchesMsg *msg)
HomePatchhomePatch (PatchID pid)
void sendMigrationMsgs (PatchID, MigrationInfo *, int)
void recvMigrateAtomsCombined (MigrateAtomsCombinedMsg *)
void moveAtom (MoveAtomMsg *msg)
void moveAllBy (MoveAllByMsg *msg)
void setLattice (SetLatticeMsg *msg)
void sendCheckpointReq (int pid, int remote, const char *key, int task)
void recvCheckpointReq (CheckpointAtomsReqMsg *msg)
void sendCheckpointLoad (CheckpointAtomsMsg *msg, int dst, int dstpe)
void recvCheckpointLoad (CheckpointAtomsMsg *msg)
void sendCheckpointStore (CheckpointAtomsMsg *msg, int dst, int dstpe)
void recvCheckpointStore (CheckpointAtomsMsg *msg)
void sendCheckpointAck (int pid, int dst, int dstpe)
void recvCheckpointAck (CheckpointAtomsReqMsg *msg)
void sendExchangeReq (int pid, int src)
void recvExchangeReq (ExchangeAtomsReqMsg *msg)
void sendExchangeMsg (ExchangeAtomsMsg *msg, int dst, int dstpe)
void recvExchangeMsg (ExchangeAtomsMsg *msg)
void setHomePatchFixedAtomNum (int patchId, int numFixed)
void sendOneHomePatch (int patchId, int nodeId)

Static Public Member Functions

static PatchMgrObject ()

Friends

class PatchMap


Detailed Description

Definition at line 145 of file PatchMgr.h.


Constructor & Destructor Documentation

PatchMgr::PatchMgr (  ) 

Definition at line 34 of file PatchMgr.C.

References PatchMap::Instance(), NAMD_bug(), recvCheckpointAck_handler(), recvCheckpointLoad_handler(), recvCheckpointReq_handler(), recvCheckpointStore_handler(), recvExchangeMsg_handler(), recvExchangeReq_handler(), and PatchMap::registerPatchMgr().

00035 {
00036     // CkPrintf("[%d] PatchMgr Created\n", CkMyPe());
00037 
00038     // Singleton pattern
00039     if (CkpvAccess(PatchMgr_instance) == NULL) {
00040         CkpvAccess(PatchMgr_instance) = this;
00041     } else {
00042         NAMD_bug("PatchMgr instanced twice on same processor!");
00043     }
00044 
00045     // Get PatchMap singleton started
00046     patchMap = PatchMap::Instance();
00047     patchMap->registerPatchMgr(this);
00048 
00049     recvCheckpointReq_index = CmiRegisterHandler((CmiHandler)recvCheckpointReq_handler);
00050     recvCheckpointLoad_index = CmiRegisterHandler((CmiHandler)recvCheckpointLoad_handler);
00051     recvCheckpointStore_index = CmiRegisterHandler((CmiHandler)recvCheckpointStore_handler);
00052     recvCheckpointAck_index = CmiRegisterHandler((CmiHandler)recvCheckpointAck_handler);
00053 
00054     recvExchangeReq_index = CmiRegisterHandler((CmiHandler)recvExchangeReq_handler);
00055     recvExchangeMsg_index = CmiRegisterHandler((CmiHandler)recvExchangeMsg_handler);
00056 
00057     // Message combining initialization
00058     migrationCountdown = 0;
00059     combineMigrationMsgs = new MigrateAtomsCombinedMsg*[CkNumPes()];
00060     int numPes = CkNumPes();
00061     for ( int i = 0; i < numPes; ++i ) combineMigrationMsgs[i] = 0;
00062 }

PatchMgr::~PatchMgr (  ) 

Definition at line 64 of file PatchMgr.C.

References ResizeArrayIter< T >::begin(), ResizeArrayIter< T >::end(), and SortedArray< Elem >::find().

00065 {
00066     HomePatchListIter hi(homePatches);
00067     for ( hi = hi.begin(); hi != hi.end(); hi++) {
00068       HomePatchElem* elem = homePatches.find(HomePatchElem(hi->pid));
00069       delete elem->patch;
00070     }
00071     delete [] combineMigrationMsgs;
00072 }


Member Function Documentation

void PatchMgr::createHomePatch ( PatchID  pid,
FullAtomList a 
)

Definition at line 80 of file PatchMgr.C.

References SortedArray< Elem >::load(), and PatchMap::registerPatch().

Referenced by WorkDistrib::createHomePatches(), ParallelIOMgr::createHomePatches(), and recvMovePatches().

00081 {
00082     HomePatch *patch = new HomePatch(pid, a);
00083     homePatches.load(HomePatchElem(pid, patch));
00084     patchMap->registerPatch(pid, patch);
00085 }

HomePatch* PatchMgr::homePatch ( PatchID  pid  )  [inline]

Definition at line 168 of file PatchMgr.h.

References SortedArray< Elem >::find().

Referenced by sendMovePatches(), and sendOneHomePatch().

00168                                     {
00169      return homePatches.find(HomePatchElem(pid))->patch;
00170   } 

void PatchMgr::moveAllBy ( MoveAllByMsg msg  ) 

Definition at line 250 of file PatchMgr.C.

References ResizeArray< Elem >::begin(), ResizeArray< Elem >::end(), and MoveAllByMsg::offset.

00250                                           {
00251   // loop over homePatches, moving every atom
00252   for (HomePatchElem *elem = homePatches.begin(); elem != homePatches.end(); elem++) {
00253     HomePatch *hp = elem->patch;
00254     for (int i=0; i<hp->getNumAtoms(); i++) {
00255       FullAtom &a = hp->atom[i];
00256       a.fixedPosition = hp->lattice.reverse_transform(a.position,a.transform);
00257       a.fixedPosition += msg->offset;
00258       a.position = hp->lattice.apply_transform(a.fixedPosition,a.transform);
00259     }
00260   }
00261   delete msg;
00262 }

void PatchMgr::moveAtom ( MoveAtomMsg msg  ) 

Definition at line 232 of file PatchMgr.C.

References Lattice::apply_transform(), HomePatch::atom, MoveAtomMsg::atomid, MoveAtomMsg::coord, FullAtom::fixedPosition, PatchMap::homePatch(), LocalID::index, Patch::lattice, AtomMap::localID(), MoveAtomMsg::moveto, notUsed, AtomMap::Object(), LocalID::pid, CompAtom::position, Lattice::reverse_transform(), and FullAtom::transform.

00232                                         {
00233   LocalID lid = AtomMap::Object()->localID(msg->atomid);
00234   if ( lid.pid != notUsed ) {
00235     HomePatch *hp = patchMap->homePatch(lid.pid);
00236     if ( hp ) {
00237       FullAtom &a = hp->atom[lid.index];
00238       if ( msg->moveto ) {
00239         a.fixedPosition = msg->coord;
00240       } else {
00241         a.fixedPosition = hp->lattice.reverse_transform(a.position,a.transform);
00242         a.fixedPosition += msg->coord;
00243       }
00244       a.position = hp->lattice.apply_transform(a.fixedPosition,a.transform);
00245     }
00246   }
00247   delete msg;
00248 }

void PatchMgr::movePatch ( PatchID  ,
NodeID   
)

Definition at line 90 of file PatchMgr.C.

References SortedArray< Elem >::load().

Referenced by WorkDistrib::distributeHomePatches().

00091 {
00092     move.load(MovePatch(pid,nodeID));
00093 }

static PatchMgr* PatchMgr::Object (  )  [inline, static]

Definition at line 152 of file PatchMgr.h.

Referenced by HomePatch::doAtomMigration(), HomePatch::exchangeAtoms(), HomePatch::exchangeCheckpoint(), recvCheckpointAck_handler(), HomePatch::recvCheckpointLoad(), recvCheckpointLoad_handler(), HomePatch::recvCheckpointReq(), recvCheckpointReq_handler(), HomePatch::recvCheckpointStore(), recvCheckpointStore_handler(), recvExchangeMsg_handler(), HomePatch::recvExchangeReq(), and recvExchangeReq_handler().

00152 { return CkpvAccess(PatchMgr_instance); }

void PatchMgr::preCreateHomePatch ( PatchID  pid,
int  atomCnt 
)

Definition at line 74 of file PatchMgr.C.

References SortedArray< Elem >::load(), and PatchMap::registerPatch().

00074                                                          {
00075     HomePatch *patch = new HomePatch(pid, atomCnt);
00076     homePatches.load(HomePatchElem(pid, patch));
00077     patchMap->registerPatch(pid, patch);
00078 }

void PatchMgr::recvAtoms ( MovePatchesMsg msg  ) 

Definition at line 174 of file PatchMgr.C.

References MovePatchesMsg::atom, PatchMap::homePatch(), MovePatchesMsg::pid, and HomePatch::reinitAtoms().

00174                                             {
00175     patchMap->homePatch(msg->pid)->reinitAtoms(msg->atom);
00176     delete msg;
00177 }

void PatchMgr::recvCheckpointAck ( CheckpointAtomsReqMsg msg  ) 

Definition at line 384 of file PatchMgr.C.

References PatchMap::homePatch(), NAMD_bug(), CheckpointAtomsReqMsg::pid, and HomePatch::recvCheckpointAck().

Referenced by recvCheckpointAck_handler().

00384                                                            {
00385   HomePatch *hp = patchMap->homePatch(msg->pid);
00386   if ( ! hp ) NAMD_bug("null HomePatch pointer in PatchMgr::recvCheckpointAck");
00387   hp->recvCheckpointAck();
00388   delete msg;
00389 }

void PatchMgr::recvCheckpointLoad ( CheckpointAtomsMsg msg  ) 

Definition at line 332 of file PatchMgr.C.

References PatchMap::homePatch(), CheckpointAtomsMsg::pid, and HomePatch::recvCheckpointLoad().

Referenced by recvCheckpointLoad_handler().

00332                                                          {
00333   HomePatch *hp = patchMap->homePatch(msg->pid);
00334   hp->recvCheckpointLoad(msg);
00335 }

void PatchMgr::recvCheckpointReq ( CheckpointAtomsReqMsg msg  ) 

Definition at line 300 of file PatchMgr.C.

References PatchMap::homePatch(), CheckpointAtomsReqMsg::key, NAMD_bug(), PatchMap::node(), CheckpointAtomsReqMsg::pe, CheckpointAtomsReqMsg::pid, HomePatch::recvCheckpointReq(), CheckpointAtomsReqMsg::replica, and CheckpointAtomsReqMsg::task.

Referenced by recvCheckpointReq_handler().

00300                                                            {
00301   int patchnode = patchMap->node(msg->pid);
00302   if ( CkMyPe() != patchnode ) {
00303     thisProxy[patchnode].recvCheckpointReq(msg);
00304   } else {
00305     HomePatch *hp = patchMap->homePatch(msg->pid);
00306     if ( ! hp ) NAMD_bug("null HomePatch pointer in PatchMgr::recvCheckpointReq");
00307     hp->recvCheckpointReq(msg->task, msg->key, msg->replica, msg->pe);
00308     delete msg;
00309   }
00310 }

void PatchMgr::recvCheckpointStore ( CheckpointAtomsMsg msg  ) 

Definition at line 357 of file PatchMgr.C.

References PatchMap::homePatch(), CheckpointAtomsMsg::pid, and HomePatch::recvCheckpointStore().

Referenced by recvCheckpointStore_handler().

00357                                                           {
00358   HomePatch *hp = patchMap->homePatch(msg->pid);
00359   hp->recvCheckpointStore(msg);
00360 }

void PatchMgr::recvExchangeMsg ( ExchangeAtomsMsg msg  ) 

Definition at line 439 of file PatchMgr.C.

References PatchMap::homePatch(), ExchangeAtomsMsg::pid, and HomePatch::recvExchangeMsg().

Referenced by recvExchangeMsg_handler().

00439                                                     {
00440   HomePatch *hp = patchMap->homePatch(msg->pid);
00441   hp->recvExchangeMsg(msg);
00442 }

void PatchMgr::recvExchangeReq ( ExchangeAtomsReqMsg msg  ) 

Definition at line 411 of file PatchMgr.C.

References ExchangeAtomsReqMsg::dstpe, PatchMap::homePatch(), NAMD_bug(), PatchMap::node(), ExchangeAtomsReqMsg::pid, and HomePatch::recvExchangeReq().

Referenced by recvExchangeReq_handler().

00411                                                        {
00412   int patchnode = patchMap->node(msg->pid);
00413   if ( CkMyPe() != patchnode ) {
00414     thisProxy[patchnode].recvExchangeReq(msg);
00415   } else {
00416     HomePatch *hp = patchMap->homePatch(msg->pid);
00417     if ( ! hp ) NAMD_bug("null HomePatch pointer in PatchMgr::recvExchangeReq");
00418     hp->recvExchangeReq(msg->dstpe);
00419     delete msg;
00420   }
00421 }

void PatchMgr::recvMigrateAtomsCombined ( MigrateAtomsCombinedMsg  ) 

Definition at line 225 of file PatchMgr.C.

References DebugM, MigrateAtomsCombinedMsg::distribute(), and MigrateAtomsCombinedMsg::srcPatchID.

00226 {
00227   DebugM(3,"Received MigrateAtomsCombinedMsg with " << msg->srcPatchID.size() << " messages.\n");
00228   msg->distribute();
00229   delete msg;
00230 }

void PatchMgr::recvMovePatches ( MovePatchesMsg msg  ) 

Definition at line 143 of file PatchMgr.C.

References MovePatchesMsg::atom, createHomePatch(), and MovePatchesMsg::pid.

00143                                                   {
00144     // Make a new HomePatch
00145     createHomePatch(msg->pid, msg->atom);
00146     delete msg;
00147 
00148     // Tell sending PatchMgr we received MovePatchMsg
00149 //    AckMovePatchesMsg *ackmsg = 
00150 //      new AckMovePatchesMsg;
00151 //    CSendMsgBranch(PatchMgr,ackMovePatches, ackmsg, thisgroup, msg->fromNodeID);
00152 }

void PatchMgr::sendAtoms ( PatchID  pid,
FullAtomList a 
)

Definition at line 163 of file PatchMgr.C.

References MovePatchesMsg::atom, NAMD_bug(), PatchMap::node(), and ResizeArray< Elem >::shared().

Referenced by WorkDistrib::reinitAtoms().

00163                                                      {
00164 
00165       MovePatchesMsg *msg = new MovePatchesMsg(pid, a);
00166 
00167       if ( msg->atom.shared() ) NAMD_bug("shared message array in PatchMgr::sendAtoms");
00168 
00169       CProxy_PatchMgr cp(thisgroup);
00170       cp[patchMap->node(pid)].recvAtoms(msg);
00171 
00172 }

void PatchMgr::sendCheckpointAck ( int  pid,
int  dst,
int  dstpe 
)

Definition at line 364 of file PatchMgr.C.

References CheckpointAtomsReqMsg::pid.

Referenced by HomePatch::recvCheckpointReq(), and HomePatch::recvCheckpointStore().

00364                                                             {
00365   CheckpointAtomsReqMsg *msg = new CheckpointAtomsReqMsg;
00366   msg->pid = pid;
00367   envelope *env = UsrToEnv(CheckpointAtomsReqMsg::pack(msg));
00368   CmiSetHandler(env,recvCheckpointAck_index);
00369 #if CMK_HAS_PARTITION
00370   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00371 #else
00372   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00373 #endif
00374 }

void PatchMgr::sendCheckpointLoad ( CheckpointAtomsMsg msg,
int  dst,
int  dstpe 
)

Definition at line 314 of file PatchMgr.C.

Referenced by HomePatch::recvCheckpointReq().

00314                                                                              {
00315   envelope *env = UsrToEnv(CheckpointAtomsMsg::pack(msg));
00316   CmiSetHandler(env,recvCheckpointLoad_index);
00317 #if CMK_HAS_PARTITION
00318   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00319 #else
00320   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00321 #endif
00322 }

void PatchMgr::sendCheckpointReq ( int  pid,
int  remote,
const char *  key,
int  task 
)

Definition at line 276 of file PatchMgr.C.

References CheckpointAtomsReqMsg::key, CheckpointAtomsReqMsg::pe, CheckpointAtomsReqMsg::pid, CheckpointAtomsReqMsg::replica, and CheckpointAtomsReqMsg::task.

Referenced by HomePatch::exchangeCheckpoint().

00276                                                                                {
00277   CheckpointAtomsReqMsg *msg = new (1+strlen(key),0) CheckpointAtomsReqMsg;
00278   msg->pid = pid;
00279   msg->pe = CkMyPe();
00280   msg->replica = CmiMyPartition();
00281   msg->task = task;
00282   strcpy(msg->key,key);
00283   envelope *env = UsrToEnv(CheckpointAtomsReqMsg::pack(msg));
00284   CmiSetHandler(env,recvCheckpointReq_index);
00285 #if CMK_HAS_PARTITION
00286   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
00287 #else
00288   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
00289 #endif
00290 }

void PatchMgr::sendCheckpointStore ( CheckpointAtomsMsg msg,
int  dst,
int  dstpe 
)

Definition at line 339 of file PatchMgr.C.

Referenced by HomePatch::recvCheckpointLoad().

00339                                                                               {
00340   envelope *env = UsrToEnv(CheckpointAtomsMsg::pack(msg));
00341   CmiSetHandler(env,recvCheckpointStore_index);
00342 #if CMK_HAS_PARTITION
00343   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00344 #else
00345   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00346 #endif
00347 }

void PatchMgr::sendExchangeMsg ( ExchangeAtomsMsg msg,
int  dst,
int  dstpe 
)

Definition at line 423 of file PatchMgr.C.

Referenced by HomePatch::recvExchangeReq().

00423                                                                         {
00424   envelope *env = UsrToEnv(ExchangeAtomsMsg::pack(msg));
00425   CmiSetHandler(env,recvExchangeMsg_index);
00426 #if CMK_HAS_PARTITION
00427   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00428 #else
00429   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00430 #endif
00431 }

void PatchMgr::sendExchangeReq ( int  pid,
int  src 
)

Definition at line 392 of file PatchMgr.C.

References ExchangeAtomsReqMsg::dstpe, and ExchangeAtomsReqMsg::pid.

Referenced by HomePatch::exchangeAtoms().

00392                                                {
00393   ExchangeAtomsReqMsg *msg = new ExchangeAtomsReqMsg;
00394   msg->pid = pid;
00395   msg->dstpe = CkMyPe();
00396   envelope *env = UsrToEnv(ExchangeAtomsReqMsg::pack(msg));
00397   CmiSetHandler(env,recvExchangeReq_index);
00398 #if CMK_HAS_PARTITION
00399   CmiInterSyncSendAndFree(CkMyPe(),src,env->getTotalsize(),(char*)env);
00400 #else
00401   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
00402 #endif
00403 }

void PatchMgr::sendMigrationMsgs ( PatchID  ,
MigrationInfo ,
int   
)

Definition at line 181 of file PatchMgr.C.

References MigrateAtomsCombinedMsg::add(), ResizeArray< Elem >::add(), DebugM, PatchMap::numHomePatches(), ResizeArray< Elem >::resize(), and ResizeArray< Elem >::size().

Referenced by HomePatch::doAtomMigration().

00181                                                                            {
00182 /*
00183   for (int i=0; i < numMsgs; i++) {
00184     PatchMgr::Object()->sendMigrationMsg(src, m[i]);
00185   }
00186 */
00187   if ( ! migrationCountdown )  // (re)initialize
00188   {
00189     // DebugM(3,"migrationCountdown (re)initialize\n");
00190     numHomePatches = patchMap->numHomePatches();
00191     migrationCountdown = numHomePatches;
00192     combineMigrationDestPes.resize(0);
00193   }
00194   for (int i=0; i < numMsgs; i++) {  // buffer messages
00195     int destNodeID = m[i].destNodeID;
00196     if ( 1 ) // destNodeID != CkMyPe() )
00197     {
00198       if ( ! combineMigrationMsgs[destNodeID] )
00199       {
00200         combineMigrationMsgs[destNodeID] = new MigrateAtomsCombinedMsg();
00201         combineMigrationDestPes.add(destNodeID);
00202       }
00203       combineMigrationMsgs[destNodeID]->add(src,m[i].destPatchID,m[i].mList);
00204     }
00205     else
00206     {
00207         // for now buffer local messages too
00208     }
00209   }
00210   migrationCountdown -= 1;
00211   // DebugM(3,"migrationCountdown = " << migrationCountdown << "\n");
00212   if ( ! migrationCountdown )  // send out combined messages
00213   {
00214     int n = combineMigrationDestPes.size();
00215     for ( int i = 0; i < n; ++i ) {
00216         int destNodeID = combineMigrationDestPes[i];
00217         DebugM(3,"Sending MigrateAtomsCombinedMsg to node " << destNodeID << "\n");
00218         CProxy_PatchMgr cp(thisgroup);
00219         cp[destNodeID].recvMigrateAtomsCombined(combineMigrationMsgs[destNodeID]);
00220         combineMigrationMsgs[destNodeID] = 0;
00221     }
00222   }
00223 }

void PatchMgr::sendMovePatches (  ) 

Definition at line 116 of file PatchMgr.C.

References MovePatchesMsg::atom, ResizeArrayIter< T >::begin(), SortedArray< Elem >::del(), ResizeArrayIter< T >::end(), homePatch(), NAMD_bug(), ResizeArray< Elem >::shared(), ResizeArray< Elem >::size(), and PatchMap::unregisterPatch().

Referenced by WorkDistrib::distributeHomePatches().

00117 {
00118     if (! move.size())
00119         return;
00120 
00121     MovePatchListIter m(move);
00122     for ( m = m.begin(); m != m.end(); m++) {
00123       HomePatch *p = homePatch(m->pid);
00124       patchMap->unregisterPatch(m->pid, p);
00125 
00126       MovePatchesMsg *msg = new MovePatchesMsg(m->pid, p->atom);
00127 
00128       // Deleting the HomePatchElem will call a destructor for clean up
00129       // but the msg elements are safe since they use a container template
00130       // that uses ref counting.
00131       delete p;
00132       homePatches.del(HomePatchElem(m->pid)); 
00133 
00134       if ( msg->atom.shared() ) NAMD_bug("shared message array in PatchMgr::sendMovePatches");
00135 
00136       // Sending to PatchMgr::recvMovePatches on remote node
00137       CProxy_PatchMgr cp(thisgroup);
00138       cp[m->nodeID].recvMovePatches(msg);
00139     }
00140     move.resize(0);
00141 }

void PatchMgr::sendOneHomePatch ( int  patchId,
int  nodeId 
)

Definition at line 95 of file PatchMgr.C.

References MovePatchesMsg::atom, HomePatch::atom, SortedArray< Elem >::del(), homePatch(), NAMD_bug(), ResizeArray< Elem >::shared(), and PatchMap::unregisterPatch().

00095                                                       {
00096     HomePatch *p = homePatch(patchId);
00097     patchMap->unregisterPatch(patchId, p);
00098 
00099     MovePatchesMsg *msg = new MovePatchesMsg(patchId, p->atom);
00100 
00101     // Deleting the HomePatchElem will call a destructor for clean up
00102     // but the msg elements are safe since they use a container template
00103     // that uses ref counting.
00104     delete p;
00105     homePatches.del(HomePatchElem(patchId)); 
00106 
00107     if ( msg->atom.shared() ) NAMD_bug("shared message array in PatchMgr::sendOneHomePatch");
00108 
00109     // Sending to PatchMgr::recvMovePatches on remote node
00110     CProxy_PatchMgr cp(thisgroup);
00111     cp[nodeId].recvMovePatches(msg);
00112 }

void PatchMgr::setHomePatchFixedAtomNum ( int  patchId,
int  numFixed 
) [inline]

Definition at line 223 of file PatchMgr.h.

References PatchMap::homePatch(), and Patch::setNumFixedAtoms().

00223                                                           {
00224       HomePatch *thisHomePatch = patchMap->homePatch(patchId);
00225       thisHomePatch->setNumFixedAtoms(numFixed);
00226   }

void PatchMgr::setLattice ( SetLatticeMsg msg  ) 

Definition at line 264 of file PatchMgr.C.

References ResizeArray< Elem >::begin(), ResizeArray< Elem >::end(), SimParameters::lattice, SetLatticeMsg::lattice, Node::Object(), and Node::simParameters.

00264                                             {
00265   // loop over homePatches, setting the lattice to the new value.
00266   for (HomePatchElem *elem = homePatches.begin(); elem != homePatches.end(); elem++) {
00267     HomePatch *hp = elem->patch;
00268     hp->lattice = msg->lattice;
00269   }
00270   // Must also do this for SimParameters in order for pressure profile to work!
00271   Node::Object()->simParameters->lattice = msg->lattice;
00272 }


Friends And Related Function Documentation

friend class PatchMap [friend]

Definition at line 196 of file PatchMgr.h.


The documentation for this class was generated from the following files:
Generated on Sat Sep 23 01:17:20 2017 for NAMD by  doxygen 1.4.7