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 #ifndef NAMD_CUDA
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 #ifndef NAMD_CUDA
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 
257 #ifndef NAMD_CUDA
258  // calculate direct nonbonded virial from segregated forces and aggregate forces
259  const Vector center = lattice.unscale( PatchMap::Object()->center(patchID) );
260 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
261  const CompAtom * const __restrict pd = positionPtrBegin;
262 #else
263  const CompAtom * const __restrict pd = p.begin();
264 #endif
265  const int n = numAtoms;
266  int roff = 0;
267 
268 #ifdef NAMD_AVXTILES
269  // If "Tiles" algorithm is active, perform same reduction and virial calc
270  // in BigReal precision, but add in forces stored in tiles data structures
271  // if they were touched on this patch.
272  if (Node::Object()->simParameters->useAVXTiles) {
273  double virialHold[6], virialSlowHold[6];
274  tiles.nativeForceVirialUpdate(flags.doFullElectrostatics, flags.doVirial,
275  pd, center, results.f[Results::nbond],
277  results.f[Results::nbond_virial],
278  results.f[Results::slow_virial],
279  virialHold, virialSlowHold);
280  f[Results::nbond_virial].resize(0);
281  f[Results::slow_virial].resize(0);
282  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virialHold[0];
283  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virialHold[1];
284  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virialHold[2];
285  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virialHold[1];
286  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virialHold[3];
287  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virialHold[4];
288  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virialHold[2];
289  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virialHold[4];
290  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  reduction->submit();
302  for (int j = 0; j < Results::maxNumForces; ++j ) results.f[j] = 0;
303  this->boxClosed(1);
304  return;
305  }
306 #endif
307 
308  for ( int j1 = Results::nbond; j1 <= Results::slow; ++j1, roff += REDUCTION_VIRIAL_SLOW_XX - REDUCTION_VIRIAL_NBOND_XX ) {
309  int j2 = j1 + ( Results::nbond_virial - Results::nbond );
310  Force * __restrict f1 = results.f[j1];
311  Force * __restrict f2 = results.f[j2];
312  BigReal virial_xx = 0.;
313  BigReal virial_xy = 0.;
314  BigReal virial_xz = 0.;
315  BigReal virial_yy = 0.;
316  BigReal virial_yz = 0.;
317  BigReal virial_zz = 0.;
318 #pragma omp simd reduction(+:virial_xx,virial_xy,virial_xz,virial_yy,virial_yz,virial_zz)
319 #pragma ivdep
320  for ( int i=0; i<n; ++i ) {
321  BigReal p_x = pd[i].position.x - center.x;
322  BigReal p_y = pd[i].position.y - center.y;
323  BigReal p_z = pd[i].position.z - center.z;
324  BigReal f_x = f2[i].x;
325  BigReal f_y = f2[i].y;
326  BigReal f_z = f2[i].z;
327  virial_xx += f_x * p_x;
328  virial_xy += f_x * p_y;
329  virial_xz += f_x * p_z;
330  virial_yy += f_y * p_y;
331  virial_yz += f_y * p_z;
332  virial_zz += f_z * p_z;
333  f1[i].x += f_x;
334  f1[i].y += f_y;
335  f1[i].z += f_z;
336  }
337  f[j2].resize(0);
338  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virial_xx;
339  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virial_xy;
340  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virial_xz;
341  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virial_xy;
342  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virial_yy;
343  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virial_yz;
344  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virial_xz;
345  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virial_yz;
346  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virial_zz;
347  }
348  reduction->submit();
349 #endif
350 
351  for (int j = 0; j < Results::maxNumForces; ++j )
352  {
353  results.f[j] = 0;
354  }
355  this->boxClosed(1);
356 }
357 
359 {
361  this->boxClosed(3);
362 }
363 
364 // BEGIN LA
366 {
367  DebugM(4, "patchID("<<patchID<<") velocityBoxClosed! call\n");
368  velocityPtrBegin = 0;
369  this->boxClosed(4); // ?? Don't know about number
370 }
371 // END LA
372 
373 // void Patch::boxClosed(int box) is virtual
374 
375 // begin gbis
377  this->boxClosed(5);
378 }
380  //dHdrPrefixPtr = 0;
381  this->boxClosed(6);
382 }
384  //bornRadPtr = 0;
385  this->boxClosed(7);
386 }
388  //dEdaSumPtr = 0;
389  this->boxClosed(8);
390 }
392  //dHdrPrefixPtr = 0;
393  this->boxClosed(9);
394 }
395 // end gbis
396 
397 //LCPO
399  this->boxClosed(10);
400 }
401 
402 void Patch::positionsReady(int doneMigration)
403 {
404  DebugM(4,"Patch::positionsReady() - patchID(" << patchID <<")"<<std::endl );
405 
406  if ( doneMigration ){
407 // #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
408 // AtomMap::Object()->registerIDs(patchID,positionPtrBegin,positionPtrEnd);
409 // #else
411 // #endif
412 
413  #ifdef NAMD_AVXTILES
415  #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
416  const CompAtom * const pd = positionPtrBegin;
417  #else
418  const CompAtom * const pd = p.begin();
419  #endif
420  tiles.atomUpdate(pd, getCompAtomExtInfo());
421  }
422  #endif
423  }
424 
425 #ifdef NAMD_KNL
426  #if defined(NAMD_AVXTILES)
427  if (!Node::Object()->simParameters->useAVXTiles)
428  #endif
429  {
430  const Vector center = lattice.unscale( PatchMap::Object()->center(patchID) );
431  const int n = numAtoms;
432  pFlt.resize(n);
433  CompAtomFlt * const pf = pFlt.begin();
434 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
435  const CompAtom * const pd = positionPtrBegin;
436 #else
437  const CompAtom * const pd = p.begin();
438 #endif
439  for ( int i=0; i<n; ++i ) {
440  // need to subtract center in double precision, then assign to float
441  pf[i].position.x = pd[i].position.x - center.x;
442  pf[i].position.y = pd[i].position.y - center.y;
443  pf[i].position.z = pd[i].position.z - center.z;
444  pf[i].vdwType = pd[i].vdwType;
445  }
446  }
447 #endif
448  boxesOpen = 2;
449  if ( flags.doMolly ) boxesOpen++;
450  // BEGIN LA
451  if (flags.doLoweAndersen) {
452  DebugM(4, "Patch::positionsReady, flags.doMolly = " << flags.doMolly << "\n");
453  boxesOpen++;
454  }
455  // END LA
456  _hasNewAtoms = (doneMigration != 0);
457 
458 #if CMK_BLUEGENEL
459  CmiNetworkProgressAfter (0);
460 #endif
461 
462  // Give all position pickup boxes access to positions
463  //positionPtrBegin = p.begin();
464 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
465  positionBox.open(positionPtrBegin);
466 #else
467  positionBox.open(p.begin());
468 #endif
469  if ( flags.doMolly ) {
470  //avgPositionPtrBegin = p_avg.begin();
472  }
473 
474  // BEGIN LA
475  if (flags.doLoweAndersen) {
477  }
478  // END LA
479  // begin gbis
480  if (flags.doGBIS) {
481  boxesOpen += 5;
482  //intRad should already be taken care of
484  psiSum.resize(numAtoms);//resize array
485  psiSum.setall(0);
487  psiFin.resize(numAtoms);//has no box
488  psiFin.setall(0);
490  bornRad.setall(0);
492  dEdaSum.resize(numAtoms);//resize array
493  dEdaSum.setall(0);
496  dHdrPrefix.setall(0);
498  }
499  // end gbis
500 
501  //LCPO
502  if (flags.doLCPO) {
503  boxesOpen++;
505  }
506 
507 #if CMK_BLUEGENEL
508  CmiNetworkProgressAfter (0);
509 #endif
510 
511  // Give all force deposit boxes access to forces
512  Force *forcePtr;
513  for ( int j = 0; j < Results::maxNumForces; ++j )
514  {
515  f[j].resize(numAtoms);
516  forcePtr = f[j].begin();
517  memset (forcePtr, 0, sizeof (Force) * numAtoms);
518  results.f[j] = forcePtr;
519  }
521 
522  #ifdef NAMD_AVXTILES
523  // Zero data in arrays in "Tiles" data structures if they have been touched
524  if (Node::Object()->simParameters->useAVXTiles)
525  tiles.zeroForces(flags.doFullElectrostatics);
526  #endif
527 
528 
529  if ( ! computesSortedByPriority ) {
530  if (positionComputeList.size() == 0 && PatchMap::Object()->node(patchID) != CkMyPe()) {
531  iout << iINFO << "PATCH_COUNT: Patch " << patchID
532  << " on PE " << CkMyPe() <<" home patch "
534  << " does not have any computes\n"
535  << endi;
536  }
537 
541  int i;
542  for ( i=0; i<positionComputeList.size(); ++i ) {
543  if ( positionComputeList[i]->priority() > PME_PRIORITY ) break;
544  }
546  }
547 
548  int seq = flags.sequence;
549 
550  // Iterate over compute objects that need to be informed we are ready
552  for ( int i=0; i < firstHoldableCompute; ++i, ++cid ) {
553  (*cid)->patchReady(patchID,doneMigration,seq);
554  }
555  Compute **cend = positionComputeList.end();
556 
557  // gzheng
558  if (Sync::Object()->holdComputes(patchID, cid, cend, doneMigration, seq)) {
559  return;
560  }
561 
562  for( ; cid != cend; cid++ ) {
563  (*cid)->patchReady(patchID,doneMigration,seq);
564  }
565 }
566 
567 // begin gbis
568 
571 
572  int seq = flags.sequence;
573  for(cid = cid.begin(); cid != cid.end(); cid++) {
574  if ( (*cid)->type() == computeNonbondedSelfType ||
575  (*cid)->type() == computeNonbondedPairType ||
576  (*cid)->type() == computeNonbondedCUDAType
577 #ifdef NAMD_CUDA
578  || (*cid)->type() == computeNonbondedCUDA2Type
579 #endif
580  ) {
581  (*cid)->gbisP2PatchReady(patchID,seq);
582  }
583  }
584 }
585 
587 
589 
590  int seq = flags.sequence;
591  for(cid = cid.begin(); cid != cid.end(); cid++) {
592  if ( (*cid)->type() == computeNonbondedSelfType ||
593  (*cid)->type() == computeNonbondedPairType ||
594  (*cid)->type() == computeNonbondedCUDAType
595 #ifdef NAMD_CUDA
596  || (*cid)->type() == computeNonbondedCUDA2Type
597 #endif
598  ) {
599  (*cid)->gbisP3PatchReady(patchID,seq);
600  }
601  }
602 }
603 
604 //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:107
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:391
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:171
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
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:402
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:387
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:87
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:569
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:398
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:586
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:383
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
infostream & endi(infostream &s)
Definition: InfoStream.C:38
void avgPositionBoxClosed(void)
Definition: Patch.C:358
ForceList f[Results::maxNumForces]
Definition: Patch.h:207
void velocityBoxClosed(void)
Definition: Patch.C:365
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:379
void psiSumBoxClosed(void)
Definition: Patch.C:376
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:112
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