PatchMgr Class Reference

#include <PatchMgr.h>

List of all members.

Public Member Functions

 PatchMgr ()
 ~PatchMgr ()
void createHomePatch (PatchID pid, FullAtomList &a)
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 74 of file PatchMgr.C.

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

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

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

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

Definition at line 165 of file PatchMgr.h.

References SortedArray< Elem >::find().

Referenced by sendMovePatches(), and sendOneHomePatch().

00165                                     {
00166      return homePatches.find(HomePatchElem(pid))->patch;
00167   } 

void PatchMgr::moveAllBy ( MoveAllByMsg msg  ) 

Definition at line 244 of file PatchMgr.C.

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

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

void PatchMgr::moveAtom ( MoveAtomMsg msg  ) 

Definition at line 226 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.

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

void PatchMgr::movePatch ( PatchID  ,
NodeID   
)

Definition at line 84 of file PatchMgr.C.

References SortedArray< Elem >::load().

Referenced by WorkDistrib::distributeHomePatches().

00085 {
00086     move.load(MovePatch(pid,nodeID));
00087 }

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::recvAtoms ( MovePatchesMsg msg  ) 

Definition at line 168 of file PatchMgr.C.

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

00168                                             {
00169     patchMap->homePatch(msg->pid)->reinitAtoms(msg->atom);
00170     delete msg;
00171 }

void PatchMgr::recvCheckpointAck ( CheckpointAtomsReqMsg msg  ) 

Definition at line 378 of file PatchMgr.C.

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

Referenced by recvCheckpointAck_handler().

00378                                                            {
00379   HomePatch *hp = patchMap->homePatch(msg->pid);
00380   if ( ! hp ) NAMD_bug("null HomePatch pointer in PatchMgr::recvCheckpointAck");
00381   hp->recvCheckpointAck();
00382   delete msg;
00383 }

void PatchMgr::recvCheckpointLoad ( CheckpointAtomsMsg msg  ) 

Definition at line 326 of file PatchMgr.C.

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

Referenced by recvCheckpointLoad_handler().

00326                                                          {
00327   HomePatch *hp = patchMap->homePatch(msg->pid);
00328   hp->recvCheckpointLoad(msg);
00329 }

void PatchMgr::recvCheckpointReq ( CheckpointAtomsReqMsg msg  ) 

Definition at line 294 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().

00294                                                            {
00295   int patchnode = patchMap->node(msg->pid);
00296   if ( CkMyPe() != patchnode ) {
00297     thisProxy[patchnode].recvCheckpointReq(msg);
00298   } else {
00299     HomePatch *hp = patchMap->homePatch(msg->pid);
00300     if ( ! hp ) NAMD_bug("null HomePatch pointer in PatchMgr::recvCheckpointReq");
00301     hp->recvCheckpointReq(msg->task, msg->key, msg->replica, msg->pe);
00302     delete msg;
00303   }
00304 }

void PatchMgr::recvCheckpointStore ( CheckpointAtomsMsg msg  ) 

Definition at line 351 of file PatchMgr.C.

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

Referenced by recvCheckpointStore_handler().

00351                                                           {
00352   HomePatch *hp = patchMap->homePatch(msg->pid);
00353   hp->recvCheckpointStore(msg);
00354 }

void PatchMgr::recvExchangeMsg ( ExchangeAtomsMsg msg  ) 

Definition at line 433 of file PatchMgr.C.

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

Referenced by recvExchangeMsg_handler().

00433                                                     {
00434   HomePatch *hp = patchMap->homePatch(msg->pid);
00435   hp->recvExchangeMsg(msg);
00436 }

void PatchMgr::recvExchangeReq ( ExchangeAtomsReqMsg msg  ) 

Definition at line 405 of file PatchMgr.C.

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

Referenced by recvExchangeReq_handler().

00405                                                        {
00406   int patchnode = patchMap->node(msg->pid);
00407   if ( CkMyPe() != patchnode ) {
00408     thisProxy[patchnode].recvExchangeReq(msg);
00409   } else {
00410     HomePatch *hp = patchMap->homePatch(msg->pid);
00411     if ( ! hp ) NAMD_bug("null HomePatch pointer in PatchMgr::recvExchangeReq");
00412     hp->recvExchangeReq(msg->dstpe);
00413     delete msg;
00414   }
00415 }

void PatchMgr::recvMigrateAtomsCombined ( MigrateAtomsCombinedMsg  ) 

Definition at line 219 of file PatchMgr.C.

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

00220 {
00221   DebugM(3,"Received MigrateAtomsCombinedMsg with " << msg->srcPatchID.size() << " messages.\n");
00222   msg->distribute();
00223   delete msg;
00224 }

void PatchMgr::recvMovePatches ( MovePatchesMsg msg  ) 

Definition at line 137 of file PatchMgr.C.

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

00137                                                   {
00138     // Make a new HomePatch
00139     createHomePatch(msg->pid, msg->atom);
00140     delete msg;
00141 
00142     // Tell sending PatchMgr we received MovePatchMsg
00143 //    AckMovePatchesMsg *ackmsg = 
00144 //      new AckMovePatchesMsg;
00145 //    CSendMsgBranch(PatchMgr,ackMovePatches, ackmsg, thisgroup, msg->fromNodeID);
00146 }

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

Definition at line 157 of file PatchMgr.C.

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

Referenced by WorkDistrib::reinitAtoms().

00157                                                      {
00158 
00159       MovePatchesMsg *msg = new MovePatchesMsg(pid, a);
00160 
00161       if ( msg->atom.shared() ) NAMD_bug("shared message array in PatchMgr::sendAtoms");
00162 
00163       CProxy_PatchMgr cp(thisgroup);
00164       cp[patchMap->node(pid)].recvAtoms(msg);
00165 
00166 }

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

Definition at line 358 of file PatchMgr.C.

References CheckpointAtomsReqMsg::pid.

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

00358                                                             {
00359   CheckpointAtomsReqMsg *msg = new CheckpointAtomsReqMsg;
00360   msg->pid = pid;
00361   envelope *env = UsrToEnv(CheckpointAtomsReqMsg::pack(msg));
00362   CmiSetHandler(env,recvCheckpointAck_index);
00363 #if CMK_HAS_PARTITION
00364   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00365 #else
00366   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00367 #endif
00368 }

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

Definition at line 308 of file PatchMgr.C.

Referenced by HomePatch::recvCheckpointReq().

00308                                                                              {
00309   envelope *env = UsrToEnv(CheckpointAtomsMsg::pack(msg));
00310   CmiSetHandler(env,recvCheckpointLoad_index);
00311 #if CMK_HAS_PARTITION
00312   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00313 #else
00314   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00315 #endif
00316 }

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

Definition at line 270 of file PatchMgr.C.

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

Referenced by HomePatch::exchangeCheckpoint().

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

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

Definition at line 333 of file PatchMgr.C.

Referenced by HomePatch::recvCheckpointLoad().

00333                                                                               {
00334   envelope *env = UsrToEnv(CheckpointAtomsMsg::pack(msg));
00335   CmiSetHandler(env,recvCheckpointStore_index);
00336 #if CMK_HAS_PARTITION
00337   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00338 #else
00339   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00340 #endif
00341 }

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

Definition at line 417 of file PatchMgr.C.

Referenced by HomePatch::recvExchangeReq().

00417                                                                         {
00418   envelope *env = UsrToEnv(ExchangeAtomsMsg::pack(msg));
00419   CmiSetHandler(env,recvExchangeMsg_index);
00420 #if CMK_HAS_PARTITION
00421   CmiInterSyncSendAndFree(dstpe,dst,env->getTotalsize(),(char*)env);
00422 #else
00423   CmiSyncSendAndFree(dstpe,env->getTotalsize(),(char*)env);
00424 #endif
00425 }

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

Definition at line 386 of file PatchMgr.C.

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

Referenced by HomePatch::exchangeAtoms().

00386                                                {
00387   ExchangeAtomsReqMsg *msg = new ExchangeAtomsReqMsg;
00388   msg->pid = pid;
00389   msg->dstpe = CkMyPe();
00390   envelope *env = UsrToEnv(ExchangeAtomsReqMsg::pack(msg));
00391   CmiSetHandler(env,recvExchangeReq_index);
00392 #if CMK_HAS_PARTITION
00393   CmiInterSyncSendAndFree(CkMyPe(),src,env->getTotalsize(),(char*)env);
00394 #else
00395   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
00396 #endif
00397 }

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

Definition at line 175 of file PatchMgr.C.

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

Referenced by HomePatch::doAtomMigration().

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

void PatchMgr::sendMovePatches (  ) 

Definition at line 110 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().

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

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

Definition at line 89 of file PatchMgr.C.

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

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

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

Definition at line 220 of file PatchMgr.h.

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

00220                                                           {
00221       HomePatch *thisHomePatch = patchMap->homePatch(patchId);
00222       thisHomePatch->setNumFixedAtoms(numFixed);
00223   }

void PatchMgr::setLattice ( SetLatticeMsg msg  ) 

Definition at line 258 of file PatchMgr.C.

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

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


Friends And Related Function Documentation

friend class PatchMap [friend]

Definition at line 193 of file PatchMgr.h.


The documentation for this class was generated from the following files:
Generated on Thu Jun 21 01:17:22 2018 for NAMD by  doxygen 1.4.7