NAMD
Patch.C
Go to the documentation of this file.
1 
7 #include "InfoStream.h"
8 #include "Patch.h"
9 #include "PatchMap.h"
10 #include "Compute.h"
11 
12 #include "AtomMap.h"
13 #include "ComputeMap.h"
14 #include "Node.h"
15 #include "Molecule.h"
16 #include "SimParameters.h"
17 #include "ResizeArrayPrimIter.h"
19 #include "Priorities.h"
20 #include "ReductionMgr.h"
21 
22 #include "Sync.h"
23 
24 #include <algorithm>
25 
27 
29  bool operator() (Compute *i, Compute *j) const {
30  return ( i->priority() < j->priority() );
31  }
32 };
33 
34 //#define DEBUGM
35 #define MIN_DEBUG_LEVEL 4
36 #include "Debug.h"
37 
39  delete atomMapper;
40 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
41  delete reduction;
42 #endif
43 }
44 
46  lattice(flags.lattice),
47  patchID(pd), numAtoms(0), numFixedAtoms(0),
48  avgPositionPtrBegin(0), avgPositionPtrEnd(0),
49  velocityPtrBegin(0), velocityPtrEnd(0), // BEGIN LA, END LA
50  positionBox(this,&Patch::positionBoxClosed,pd,0),
51  avgPositionBox(this,&Patch::avgPositionBoxClosed,pd,3),
52  velocityBox(this,&Patch::velocityBoxClosed,pd,4), // BEGIN LA, END LA
53  psiSumBox(this,&Patch::psiSumBoxClosed,pd,5), // begin gbis
54  intRadBox(this,&Patch::intRadBoxClosed,pd,6),
55  bornRadBox(this,&Patch::bornRadBoxClosed,pd,7),
56  dEdaSumBox(this,&Patch::dEdaSumBoxClosed,pd,8),
57  dHdrPrefixBox(this,&Patch::dHdrPrefixBoxClosed,pd,9), //end gbis
58  lcpoTypeBox(this,&Patch::lcpoTypeBoxClosed,pd,10),
59  forceBox(this,&Patch::forceBoxClosed,pd,1),
60  boxesOpen(0), _hasNewAtoms(0),
61  computesSortedByPriority(0), firstHoldableCompute(0)
62 
63  // DMK - Atom Separation (water vs. non-water)
65  ,numWaterAtoms(-1)
66  #endif
67 {
68  //CkPrintf("GBIS: PatchCreated\n");
69 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
70  positionPtrBegin = 0;
71  positionPtrEnd = 0;
72 #endif
73 
74  nChild = 0;
75  child = NULL;
76 #ifdef NODEAWARE_PROXY_SPANNINGTREE
77  #ifdef USE_NODEPATCHMGR
78  nodeChildren = NULL;
79  numNodeChild = 0;
80  #endif
81 #endif
82 
84  atomMapper = new AtomMapper(pd);
85 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
87 #endif
88 
89  // DMK
90  #if defined(NAMD_MIC)
91  cudaAtomPtr = NULL;
92  #if MIC_SUBMIT_ATOMS_ON_ARRIVAL != 0
93  pthread_mutex_init(&mic_atomData_mutex, NULL);
94  mic_atomData = NULL;
95  mic_atomData_seq = -1;
96  mic_atomData_allocSize_host = 0;
97  for (int i = 0; i < MIC_MAX_DEVICES_PER_NODE; i++) {
98  mic_atomData_prev[i] = NULL;
99  mic_atomData_deviceSeq[i] = -1;
100  mic_atomData_devicePtr[i] = 0;
101  mic_atomData_allocSize_device[i] = 0;
102  }
103  #endif
104  #endif
105 }
106 
108 {
109  if ( computesSortedByPriority ) {
112  }
113  //DebugM(4, "registerPositionPickupa("<<patchID<<") from " << cid->cid << "\n");
114  if (positionComputeList.add(cid) < 0)
115  {
116  DebugM(7, "registerPositionPickup() failed for cid " << cid->cid << std::endl);
117  return NULL;
118  }
119  return positionBox.checkOut(cid->cid);
120 }
121 
123 {
124  if ( computesSortedByPriority ) {
127  }
128  DebugM(4, "UnregisterPositionPickup from " << cid->cid << "\n");
130  positionBox.checkIn(*box);
131  *box = 0;
132 }
133 
135 {
136  //DebugM(4, "registerAvgPositionPickup("<<patchID<<") from " << cid->cid << "\n");
137  return avgPositionBox.checkOut(cid->cid);
138 }
139 
141 {
142  DebugM(4, "UnregisterAvgPositionPickup from " << cid->cid << "\n");
143  avgPositionBox.checkIn(*box);
144  *box = 0;
145 }
146 
147 // BEGIN LA
149 {
150  //DebugM(4, "registerVelocityPickup("<<patchID<<") from " << cid->cid << "\n");
151  return velocityBox.checkOut(cid->cid);
152 }
153 
155 {
156  DebugM(4, "UnregisterVelocityPickup from " << cid->cid << "\n");
157  velocityBox.checkIn(*box);
158  *box = 0;
159 }
160 // END LA
161 
162 //begin gbis
163 //deposit, not pickup
165 
166  if (psiSumComputeList.add(cid) < 0) {
167  DebugM(7, "registerPsiSumDeposit() failed for cid " << cid->cid << std::endl);
168  DebugM(7, " size of psiSumCompueList " << psiSumComputeList.size() << std::endl);
169  return NULL;
170  }
171  return psiSumBox.checkOut(cid->cid);
172 }
173 
175  psiSumComputeList.del(cid);
176  psiSumBox.checkIn(*box);
177  *box = 0;
178 }
180  return intRadBox.checkOut(cid->cid);
181 }
183  intRadBox.checkIn(*box);
184  *box = 0;
185 }
186 
187 //LCPO
189  return lcpoTypeBox.checkOut(cid->cid);
190 }
192  lcpoTypeBox.checkIn(*box);
193  *box = 0;
194 }
195 
197  return bornRadBox.checkOut(cid->cid);
198 }
200  bornRadBox.checkIn(*box);
201  *box = 0;
202 }
203 
205  if (dEdaSumComputeList.add(cid) < 0) {
206  DebugM(7, "registerDEdaSumDeposit() failed for cid " << cid->cid << std::endl);
207  DebugM(7, " size of dEdaSumCompueList " << dEdaSumComputeList.size() << std::endl);
208  return NULL;
209  }
210  return dEdaSumBox.checkOut(cid->cid);
211 }
213  dEdaSumComputeList.del(cid);
214  dEdaSumBox.checkIn(*box);
215  *box = 0;
216 }
217 
219 {
220  return dHdrPrefixBox.checkOut(cid->cid);
221 }
223  dHdrPrefixBox.checkIn(*box);
224  *box = 0;
225 }
226 //end gbis
227 
229 {
230  if (forceComputeList.add(cid) < 0)
231  {
232  DebugM(7, "registerForceDeposit() failed for cid " << cid->cid << std::endl);
233  DebugM(7, " size of forceCompueList " << forceComputeList.size() << std::endl);
234  return NULL;
235  }
236  return forceBox.checkOut(cid->cid);
237 }
238 
240 {
241  DebugM(4, "unregisterForceDeposit() computeID("<<cid<<")"<<std::endl);
242  forceComputeList.del(cid);
243  forceBox.checkIn(*box);
244  *box = 0;
245 }
246 
248 {
249  //positionPtrBegin = 0;
250  this->boxClosed(0);
251 }
252 
254 {
255  DebugM(4, "patchID("<<patchID<<") forceBoxClosed! call\n");
256 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
257  // calculate direct nonbonded virial from segregated forces and aggregate forces
258  const Vector center = lattice.unscale( PatchMap::Object()->center(patchID) );
259 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
260  const CompAtom * const __restrict pd = positionPtrBegin;
261 #else
262  const CompAtom * const __restrict pd = p.begin();
263 #endif
264  const int n = numAtoms;
265  int roff = 0;
266 
267 #ifdef NAMD_AVXTILES
268  // If "Tiles" algorithm is active, perform same reduction and virial calc
269  // in BigReal precision, but add in forces stored in tiles data structures
270  // if they were touched on this patch.
271  if (Node::Object()->simParameters->useAVXTiles) {
272  double virialHold[6], virialSlowHold[6];
273  tiles.nativeForceVirialUpdate(flags.doFullElectrostatics, flags.doVirial,
274  pd, center, results.f[Results::nbond],
276  results.f[Results::nbond_virial],
277  results.f[Results::slow_virial],
278  virialHold, virialSlowHold);
279  f[Results::nbond_virial].resize(0);
280  f[Results::slow_virial].resize(0);
281  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virialHold[0];
282  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virialHold[1];
283  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virialHold[2];
284  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virialHold[1];
285  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virialHold[3];
286  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virialHold[4];
287  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virialHold[2];
288  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virialHold[4];
289  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virialHold[5];
291  roff += REDUCTION_VIRIAL_SLOW_XX - REDUCTION_VIRIAL_NBOND_XX;
292  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virialSlowHold[0];
293  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virialSlowHold[1];
294  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virialSlowHold[2];
295  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virialSlowHold[1];
296  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virialSlowHold[3];
297  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virialSlowHold[4];
298  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virialSlowHold[2];
299  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virialSlowHold[4];
300  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virialSlowHold[5];
301  }
302  reduction->submit();
303  for (int j = 0; j < Results::maxNumForces; ++j ) results.f[j] = 0;
304  this->boxClosed(1);
305  return;
306  }
307 #endif
308 
309  for ( int j1 = Results::nbond; j1 <= Results::slow; ++j1, roff += REDUCTION_VIRIAL_SLOW_XX - REDUCTION_VIRIAL_NBOND_XX ) {
310  int j2 = j1 + ( Results::nbond_virial - Results::nbond );
311  Force * __restrict f1 = results.f[j1];
312  Force * __restrict f2 = results.f[j2];
313  BigReal virial_xx = 0.;
314  BigReal virial_xy = 0.;
315  BigReal virial_xz = 0.;
316  BigReal virial_yy = 0.;
317  BigReal virial_yz = 0.;
318  BigReal virial_zz = 0.;
319 #pragma omp simd reduction(+:virial_xx,virial_xy,virial_xz,virial_yy,virial_yz,virial_zz)
320 #pragma ivdep
321  for ( int i=0; i<n; ++i ) {
322  BigReal p_x = pd[i].position.x - center.x;
323  BigReal p_y = pd[i].position.y - center.y;
324  BigReal p_z = pd[i].position.z - center.z;
325  BigReal f_x = f2[i].x;
326  BigReal f_y = f2[i].y;
327  BigReal f_z = f2[i].z;
328  virial_xx += f_x * p_x;
329  virial_xy += f_x * p_y;
330  virial_xz += f_x * p_z;
331  virial_yy += f_y * p_y;
332  virial_yz += f_y * p_z;
333  virial_zz += f_z * p_z;
334  f1[i].x += f_x;
335  f1[i].y += f_y;
336  f1[i].z += f_z;
337  }
338  f[j2].resize(0);
339  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virial_xx;
340  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virial_xy;
341  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virial_xz;
342  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virial_xy;
343  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virial_yy;
344  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virial_yz;
345  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virial_xz;
346  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virial_yz;
347  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virial_zz;
348  }
349  reduction->submit();
350 #endif
351 
352  for (int j = 0; j < Results::maxNumForces; ++j )
353  {
354  results.f[j] = 0;
355  }
356  this->boxClosed(1);
357 }
358 
360 {
362  this->boxClosed(3);
363 }
364 
365 // BEGIN LA
367 {
368  DebugM(4, "patchID("<<patchID<<") velocityBoxClosed! call\n");
369  velocityPtrBegin = 0;
370  this->boxClosed(4); // ?? Don't know about number
371 }
372 // END LA
373 
374 // void Patch::boxClosed(int box) is virtual
375 
376 // begin gbis
378  this->boxClosed(5);
379 }
381  //dHdrPrefixPtr = 0;
382  this->boxClosed(6);
383 }
385  //bornRadPtr = 0;
386  this->boxClosed(7);
387 }
389  //dEdaSumPtr = 0;
390  this->boxClosed(8);
391 }
393  //dHdrPrefixPtr = 0;
394  this->boxClosed(9);
395 }
396 // end gbis
397 
398 //LCPO
400  this->boxClosed(10);
401 }
402 
403 void Patch::positionsReady(int doneMigration)
404 {
405  DebugM(4,"Patch::positionsReady() - patchID(" << patchID <<")"<<std::endl );
406 
407  if ( doneMigration ){
408 // #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
409 // AtomMap::Object()->registerIDs(patchID,positionPtrBegin,positionPtrEnd);
410 // #else
412 // #endif
413 
414  #ifdef NAMD_AVXTILES
416  #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
417  const CompAtom * const pd = positionPtrBegin;
418  #else
419  const CompAtom * const pd = p.begin();
420  #endif
421  tiles.atomUpdate(pd, getCompAtomExtInfo());
422  }
423  #endif
424  }
425 
426 #ifdef NAMD_KNL
427  #if defined(NAMD_AVXTILES)
428  if (!Node::Object()->simParameters->useAVXTiles)
429  #endif
430  {
431  const Vector center = lattice.unscale( PatchMap::Object()->center(patchID) );
432  const int n = numAtoms;
433  pFlt.resize(n);
434  CompAtomFlt * const pf = pFlt.begin();
435 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
436  const CompAtom * const pd = positionPtrBegin;
437 #else
438  const CompAtom * const pd = p.begin();
439 #endif
440  for ( int i=0; i<n; ++i ) {
441  // need to subtract center in double precision, then assign to float
442  pf[i].position.x = pd[i].position.x - center.x;
443  pf[i].position.y = pd[i].position.y - center.y;
444  pf[i].position.z = pd[i].position.z - center.z;
445  pf[i].vdwType = pd[i].vdwType;
446  }
447  }
448 #endif
449  boxesOpen = 2;
450  if ( flags.doMolly ) boxesOpen++;
451  // BEGIN LA
452  if (flags.doLoweAndersen) {
453  DebugM(4, "Patch::positionsReady, flags.doMolly = " << flags.doMolly << "\n");
454  boxesOpen++;
455  }
456  // END LA
457  _hasNewAtoms = (doneMigration != 0);
458 
459 #if CMK_BLUEGENEL
460  CmiNetworkProgressAfter (0);
461 #endif
462 
463  // Give all position pickup boxes access to positions
464  //positionPtrBegin = p.begin();
465 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
466  positionBox.open(positionPtrBegin);
467 #else
468  positionBox.open(p.begin());
469 #endif
470  if ( flags.doMolly ) {
471  //avgPositionPtrBegin = p_avg.begin();
473  }
474 
475  // BEGIN LA
476  if (flags.doLoweAndersen) {
478  }
479  // END LA
480  // begin gbis
481  if (flags.doGBIS) {
482  boxesOpen += 5;
483  //intRad should already be taken care of
485  psiSum.resize(numAtoms);//resize array
486  psiSum.setall(0);
488  psiFin.resize(numAtoms);//has no box
489  psiFin.setall(0);
491  bornRad.setall(0);
493  dEdaSum.resize(numAtoms);//resize array
494  dEdaSum.setall(0);
497  dHdrPrefix.setall(0);
499  }
500  // end gbis
501 
502  //LCPO
503  if (flags.doLCPO) {
504  boxesOpen++;
506  }
507 
508 #if CMK_BLUEGENEL
509  CmiNetworkProgressAfter (0);
510 #endif
511 
512  // Give all force deposit boxes access to forces
513  Force *forcePtr;
514  for ( int j = 0; j < Results::maxNumForces; ++j )
515  {
516  f[j].resize(numAtoms);
517  forcePtr = f[j].begin();
518  memset (forcePtr, 0, sizeof (Force) * numAtoms);
519  results.f[j] = forcePtr;
520  }
522 
523  #ifdef NAMD_AVXTILES
524  // Zero data in arrays in "Tiles" data structures if they have been touched
525  if (Node::Object()->simParameters->useAVXTiles)
526  tiles.zeroForces(flags.doFullElectrostatics);
527  #endif
528 
529 
530  if ( ! computesSortedByPriority ) {
531  if (positionComputeList.size() == 0 && PatchMap::Object()->node(patchID) != CkMyPe()) {
532  iout << iINFO << "PATCH_COUNT: Patch " << patchID
533  << " on PE " << CkMyPe() <<" home patch "
535  << " does not have any computes\n"
536  << endi;
537  }
538 
542  int i;
543  for ( i=0; i<positionComputeList.size(); ++i ) {
544  if ( positionComputeList[i]->priority() > PME_PRIORITY ) break;
545  }
547  }
548 
549  int seq = flags.sequence;
550 
551  // Iterate over compute objects that need to be informed we are ready
553  for ( int i=0; i < firstHoldableCompute; ++i, ++cid ) {
554  (*cid)->patchReady(patchID,doneMigration,seq);
555  }
556  Compute **cend = positionComputeList.end();
557 
558  // gzheng
559  if (Sync::Object()->holdComputes(patchID, cid, cend, doneMigration, seq)) {
560  return;
561  }
562 
563  for( ; cid != cend; cid++ ) {
564  (*cid)->patchReady(patchID,doneMigration,seq);
565  }
566 }
567 
568 // begin gbis
569 
572 
573  int seq = flags.sequence;
574  for(cid = cid.begin(); cid != cid.end(); cid++) {
575  if ( (*cid)->type() == computeNonbondedSelfType ||
576  (*cid)->type() == computeNonbondedPairType ||
577  (*cid)->type() == computeNonbondedCUDAType
578 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
579  || (*cid)->type() == computeNonbondedCUDA2Type
580 #endif
581  ) {
582  (*cid)->gbisP2PatchReady(patchID,seq);
583  }
584  }
585 }
586 
588 
590 
591  int seq = flags.sequence;
592  for(cid = cid.begin(); cid != cid.end(); cid++) {
593  if ( (*cid)->type() == computeNonbondedSelfType ||
594  (*cid)->type() == computeNonbondedPairType ||
595  (*cid)->type() == computeNonbondedCUDAType
596 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
597  || (*cid)->type() == computeNonbondedCUDA2Type
598 #endif
599  ) {
600  (*cid)->gbisP3PatchReady(patchID,seq);
601  }
602  }
603 }
604 
605 //end gbis
static Node * Object()
Definition: Node.h:86
ComputePtrList forceComputeList
Definition: Patch.h:240
register BigReal virial_xy
Box< Patch, GBReal > * registerDEdaSumDeposit(Compute *cid)
Definition: Patch.C:204
register BigReal virial_xz
std::ostream & iINFO(std::ostream &s)
Definition: InfoStream.C:81
Box< Patch, CompAtom > * registerAvgPositionPickup(Compute *cid)
Definition: Patch.C:134
int firstHoldableCompute
Definition: Patch.h:211
RealList intRad
Definition: Patch.h:155
register BigReal virial_yz
int computesSortedByPriority
Definition: Patch.h:210
void unregisterAvgPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:140
ComputePtrList dEdaSumComputeList
Definition: Patch.h:230
OwnerBox< Patch, Results > forceBox
Definition: Patch.h:239
ComputePtrList psiSumComputeList
Definition: Patch.h:226
void unregisterPsiSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:174
void dHdrPrefixBoxClosed(void)
Definition: Patch.C:392
Lattice & lattice
Definition: Patch.h:126
void checkIn(Box< Owner, Data > *box)
Definition: OwnerBox.h:101
static PatchMap * Object()
Definition: PatchMap.h:27
int add(const Elem &elem)
Definition: SortedArray.h:55
Definition: Vector.h:64
#define NAMD_SeparateWaters
Definition: common.h:173
SimParameters * simParameters
Definition: Node.h:178
OwnerBox< Patch, Real > bornRadBox
Definition: Patch.h:227
BigReal & item(int i)
Definition: ReductionMgr.h:312
#define DebugM(x, y)
Definition: Debug.h:59
void unregisterForceDeposit(Compute *cid, Box< Patch, Results > **const box)
Definition: Patch.C:239
OwnerBox< Patch, int > lcpoTypeBox
Definition: Patch.h:236
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
BigReal z
Definition: Vector.h:66
void unregisterDHdrPrefixPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:222
RealList dHdrPrefix
Definition: Patch.h:159
Position position
Definition: NamdTypes.h:53
void positionsReady(int n=0)
Definition: Patch.C:403
SubmitReduction * willSubmit(int setID, int size=-1)
Definition: ReductionMgr.C:365
Box< Patch, Real > * registerBornRadPickup(Compute *cid)
Definition: Patch.C:196
GBRealList psiFin
Definition: Patch.h:157
if(ComputeNonbondedUtil::goMethod==2)
void dEdaSumBoxClosed(void)
Definition: Patch.C:388
void registerIDsCompAtomExt(const CompAtomExt *begin, const CompAtomExt *end)
Definition: AtomMap.C:24
static ReductionMgr * Object(void)
Definition: ReductionMgr.h:278
#define iout
Definition: InfoStream.h:51
int doLoweAndersen
Definition: PatchTypes.h:26
Box< Patch, int > * registerLcpoTypePickup(Compute *cid)
Definition: Patch.C:188
ResizeArrayPrimIter< Compute * > ComputePtrListIter
Definition: Patch.C:26
CudaAtom * cudaAtomPtr
Definition: Patch.h:205
void forceBoxClosed(void)
Definition: Patch.C:253
AtomMapper * atomMapper
Definition: Patch.h:152
GBRealList dEdaSum
Definition: Patch.h:160
void open(Data *d)
Definition: OwnerBox.h:39
Definition: Patch.h:35
Flags flags
Definition: Patch.h:127
Patch(PatchID pd)
Definition: Patch.C:45
register BigReal virial_yy
Box< Patch, GBReal > * registerPsiSumDeposit(Compute *cid)
Definition: Patch.C:164
#define PME_PRIORITY
Definition: Priorities.h:29
int boxesOpen
Definition: Patch.h:243
OwnerBox< Patch, CompAtom > avgPositionBox
Definition: Patch.h:215
void sort(void)
Definition: SortedArray.h:66
IntList lcpoType
Definition: Patch.h:164
GBRealList psiSum
Definition: Patch.h:156
void gbisP2Ready()
Definition: Patch.C:570
int doFullElectrostatics
Definition: PatchTypes.h:23
iterator end(void)
Definition: ResizeArray.h:37
Box< Patch, Real > * registerIntRadPickup(Compute *cid)
Definition: Patch.C:179
OwnerBox< Patch, CompAtom > positionBox
Definition: Patch.h:213
Force * f[maxNumForces]
Definition: PatchTypes.h:67
CompAtomList p
Definition: Patch.h:146
int priority(void)
Definition: Compute.h:65
static Sync * Object()
Definition: Sync.h:50
int numAtoms
Definition: Patch.h:144
void setall(const Elem &elem)
Definition: ResizeArray.h:90
register BigReal virial_zz
BigReal x
Definition: Vector.h:66
bool operator()(Compute *i, Compute *j) const
Definition: Patch.C:29
ResizeArrayPrimIter< T > begin(void) const
void lcpoTypeBoxClosed(void)
Definition: Patch.C:399
int sequence
Definition: PatchTypes.h:18
int PatchID
Definition: NamdTypes.h:182
Box< Owner, Data > * checkOut(int id)
Definition: OwnerBox.h:82
CompAtom * avgPositionPtrBegin
Definition: Patch.h:197
void gbisP3Ready()
Definition: Patch.C:587
OwnerBox< Patch, CompAtom > velocityBox
Definition: Patch.h:218
void unregisterBornRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:199
ComputePtrList positionComputeList
Definition: Patch.h:214
OwnerBox< Patch, Real > intRadBox
Definition: Patch.h:223
void unregisterPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:122
BlockRadixSort::TempStorage sort
OwnerBox< Patch, Real > dHdrPrefixBox
Definition: Patch.h:231
short vdwType
Definition: NamdTypes.h:55
RealList bornRad
Definition: Patch.h:158
void resize(int i)
Definition: ResizeArray.h:84
int node(int pid) const
Definition: PatchMap.h:114
Position unscale(ScaledPosition s) const
Definition: Lattice.h:77
const PatchID patchID
Definition: Patch.h:143
int _hasNewAtoms
Definition: Patch.h:245
OwnerBox< Patch, GBReal > dEdaSumBox
Definition: Patch.h:229
void unregisterIntRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:182
Box< Patch, Real > * registerDHdrPrefixPickup(Compute *cid)
Definition: Patch.C:218
int doVirial
Definition: PatchTypes.h:21
BigReal y
Definition: Vector.h:66
int doLCPO
Definition: PatchTypes.h:29
register BigReal virial_xx
void del(const Elem &elem)
Definition: SortedArray.h:59
int * child
Definition: Patch.h:262
void bornRadBoxClosed(void)
Definition: Patch.C:384
void positionBoxClosed(void)
Definition: Patch.C:247
ResizeArrayPrimIter< T > end(void) const
void unregisterVelocityPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:154
int doGBIS
Definition: PatchTypes.h:28
Results results
Definition: Patch.h:208
void submit(void)
Definition: ReductionMgr.h:323
int size(void) const
Definition: ResizeArray.h:127
void avgPositionBoxClosed(void)
Definition: Patch.C:359
ForceList f[Results::maxNumForces]
Definition: Patch.h:207
void velocityBoxClosed(void)
Definition: Patch.C:366
int nChild
Definition: Patch.h:263
CompAtomExtList pExt
Definition: Patch.h:174
const ComputeID cid
Definition: Compute.h:43
void unregisterDEdaSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:212
OwnerBox< Patch, GBReal > psiSumBox
Definition: Patch.h:225
void intRadBoxClosed(void)
Definition: Patch.C:380
void psiSumBoxClosed(void)
Definition: Patch.C:377
Box< Patch, CompAtom > * registerVelocityPickup(Compute *cid)
Definition: Patch.C:148
virtual ~Patch()
Definition: Patch.C:38
void unregisterLcpoTypePickup(Compute *cid, Box< Patch, int > **const box)
Definition: Patch.C:191
int doMolly
Definition: PatchTypes.h:24
virtual void boxClosed(int)=0
Box< Patch, CompAtom > * registerPositionPickup(Compute *cid)
Definition: Patch.C:107
double BigReal
Definition: common.h:114
CompAtom * velocityPtrBegin
Definition: Patch.h:201
CompAtomExt * getCompAtomExtInfo()
Definition: Patch.h:117
iterator begin(void)
Definition: ResizeArray.h:36
Box< Patch, Results > * registerForceDeposit(Compute *cid)
Definition: Patch.C:228