Remove unused code 57/4057/2
authorDavid <dhardy@ks.uiuc.edu>
Wed, 25 Apr 2018 15:03:57 +0000 (10:03 -0500)
committerDavid <dhardy@ks.uiuc.edu>
Wed, 25 Apr 2018 22:24:24 +0000 (17:24 -0500)
HomePatch has two constructors, one of which takes just the number of
atoms rather than the FullAtomList.  That constructor is called only
from PatchMgr::preCreateHomePatch, which is now never called.

Both methods and their prototypes have been removed.

Change-Id: Id839d68c2c24a7066bc454c41587c8bdd3488c11

src/HomePatch.C
src/HomePatch.h
src/PatchMgr.C
src/PatchMgr.h

index b57b3f2..16c46a8 100644 (file)
@@ -89,115 +89,6 @@ void mollify(CompAtom *qtilde,const HGArrayVector &q0,const BigReal *lambda, HGA
 #endif
 
 
-HomePatch::HomePatch(PatchID pd, int atomCnt) : Patch(pd)
-// DMK - Atom Separation (water vs. non-water)
-#if NAMD_SeparateWaters != 0
-  ,tempAtom()
-#endif
-{
-  settle_initialized = 0;
-
-  doAtomUpdate = true;
-  rattleListValid = false;
-
-  exchange_msg = 0;
-  exchange_req = -1;
-
-  //tracking the end of gbis phases
-  numGBISP1Arrived = 0;
-  numGBISP2Arrived = 0;
-  numGBISP3Arrived = 0;
-  phase1BoxClosedCalled = false;
-  phase2BoxClosedCalled = false;
-  phase3BoxClosedCalled = false;
-
-  min.x = PatchMap::Object()->min_a(patchID);
-  min.y = PatchMap::Object()->min_b(patchID);
-  min.z = PatchMap::Object()->min_c(patchID);
-  max.x = PatchMap::Object()->max_a(patchID);
-  max.y = PatchMap::Object()->max_b(patchID);
-  max.z = PatchMap::Object()->max_c(patchID);
-  center = 0.5*(min+max);
-
-  int aAway = PatchMap::Object()->numaway_a();
-  if ( PatchMap::Object()->periodic_a() ||
-       PatchMap::Object()->gridsize_a() > aAway + 1 ) {
-    aAwayDist = (max.x - min.x) * aAway;
-  } else {
-    aAwayDist = Node::Object()->simParameters->patchDimension;
-  }
-  int bAway = PatchMap::Object()->numaway_b();
-  if ( PatchMap::Object()->periodic_b() ||
-       PatchMap::Object()->gridsize_b() > bAway + 1 ) {
-    bAwayDist = (max.y - min.y) * bAway;
-  } else {
-    bAwayDist = Node::Object()->simParameters->patchDimension;
-  }
-  int cAway = PatchMap::Object()->numaway_c();
-  if ( PatchMap::Object()->periodic_c() ||
-       PatchMap::Object()->gridsize_c() > cAway + 1 ) {
-    cAwayDist = (max.z - min.z) * cAway;
-  } else {
-    cAwayDist = Node::Object()->simParameters->patchDimension;
-  }
-
-  migrationSuspended = false;
-  allMigrationIn = false;
-  marginViolations = 0;
-  patchMapRead = 0; // We delay read of PatchMap data
-                   // to make sure it is really valid
-  inMigration = false;
-  numMlBuf = 0;
-  flags.sequence = -1;
-  flags.maxForceUsed = -1;
-
-  numAtoms = atomCnt;
-  replacementForces = 0;
-
-  SimParameters *simParams = Node::Object()->simParameters;
-  doPairlistCheck_newTolerance = 
-       0.5 * ( simParams->pairlistDist - simParams->cutoff );
-
-
-  numFixedAtoms = 0;
-  //if ( simParams->fixedAtomsOn ) {
-  //  for ( int i = 0; i < numAtoms; ++i ) {
-  //    numFixedAtoms += ( atom[i].atomFixed ? 1 : 0 );
-  //  }
-  //}
-
-#ifdef NODEAWARE_PROXY_SPANNINGTREE
-  ptnTree.resize(0);
-  /*children = NULL;
-  numChild = 0;*/
-#else
-  child =  new int[proxySpanDim];
-  nChild = 0;  // number of proxy spanning tree children
-#endif
-
-#if CMK_PERSISTENT_COMM && USE_PERSISTENT_TREE
-  nphs = 0;
-  localphs = NULL;
-  isProxyChanged = 0;
-#endif
-
-
-  // DMK - Atom Separation (water vs. non-water)
-  #if NAMD_SeparateWaters != 0
-
-    // Create the scratch memory for separating atoms
-    tempAtom.resize(numAtoms);
-    numWaterAtoms = -1;
-
-  #endif
-  // Handle unusual water models here
-  if (simParams->watmodel == WAT_TIP4) init_tip4();
-  else if (simParams->watmodel == WAT_SWM4) init_swm4();
-
-  isNewProxyAdded = 0;
-
-}
-
 HomePatch::HomePatch(PatchID pd, FullAtomList &al) : Patch(pd)
 // DMK - Atom Separation (water vs. non-water)
 #if NAMD_SeparateWaters != 0
index c7e6320..53865d0 100644 (file)
@@ -91,13 +91,9 @@ class HomePatch : public Patch {
   friend class ComputeGlobal;
 
 private: 
-
-  HomePatch(PatchID, int atomCnt);
   // for PatchMgr to use only
   HomePatch(PatchID, FullAtomList&);
 
-//  HomePatch(PatchID, int atomCnt);
-
   void reinitAtoms(FullAtomList&);
   ScaledPosition min, max, center;
   BigReal aAwayDist, bAwayDist, cAwayDist;
index 6e568c2..ebdef73 100644 (file)
@@ -71,12 +71,6 @@ PatchMgr::~PatchMgr()
     delete [] combineMigrationMsgs;
 }
 
-void PatchMgr::preCreateHomePatch(PatchID pid, int atomCnt){
-    HomePatch *patch = new HomePatch(pid, atomCnt);
-    homePatches.load(HomePatchElem(pid, patch));
-    patchMap->registerPatch(pid, patch);
-}
-
 void PatchMgr::createHomePatch(PatchID pid, FullAtomList &a) 
 {
     HomePatch *patch = new HomePatch(pid, a);
index 4726e43..b9cb8e9 100644 (file)
@@ -153,9 +153,6 @@ public:
   
   void createHomePatch(PatchID pid, FullAtomList &a);
 
-  //atomCnt is the number of atoms patch pid has
-  void preCreateHomePatch(PatchID pid, int atomCnt);
-
   void movePatch(PatchID, NodeID);
   void sendMovePatches();
   void recvMovePatches(MovePatchesMsg *msg);