ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 1097 by gezelter, Mon Apr 12 20:32:20 2004 UTC vs.
Revision 1104 by gezelter, Tue Apr 13 16:26:03 2004 UTC

# Line 167 | Line 167 | void SimSetup::makeMolecules(void){
167  
168   void SimSetup::makeMolecules(void){
169    int i, j, k;
170 <  int exI, exJ, exK, exL, slI;
170 >  int exI, exJ, exK, exL, slI, slJ;
171    int tempI, tempJ, tempK, tempL;
172    int molI;
173    int stampID, atomOffset, rbOffset;
# Line 465 | Line 465 | void SimSetup::makeMolecules(void){
465              
466            }
467          }
468 +
469 +        molInfo.myRigidBodies.push_back(myRB);
470 +        info[k].rigidBodies.push_back(myRB);
471 +      }
472 +      
473 +
474 +      // After this is all set up, scan through the atoms to
475 +      // see if they can be added to the integrableObjects:
476 +
477 +      for (j = 0; j < molInfo.nAtoms; j++){
478 +
479 + #ifdef IS_MPI
480 +        slJ = molInfo.myAtoms[j]->getGlobalIndex();
481 + #else
482 +        slJ = j+atomOffset;
483 + #endif
484 +
485 +        // if they aren't on the skip list, then they can be integrated
486 +
487 +        if (skipList.find(slJ) == skipList.end()) {
488 +          mySD = (StuntDouble *) molInfo.myAtoms[j];
489 +          info[k].integrableObjects.push_back(mySD);
490 +          molInfo.myIntegrableObjects.push_back(mySD);
491 +        }
492 +      }
493 +
494 +      // all rigid bodies are integrated:
495 +
496 +      for (j = 0; j < molInfo.nRigidBodies; j++) {
497 +        mySD = (StuntDouble *) molInfo.myRigidBodies[j];
498 +        info[k].integrableObjects.push_back(mySD);      
499 +        molInfo.myIntegrableObjects.push_back(mySD);
500        }
501 +    
502        
503        // send the arrays off to the forceField for init.
504        
# Line 482 | Line 515 | void SimSetup::makeMolecules(void){
515        delete[] theBonds;
516        delete[] theBends;
517        delete[] theTorsions;
518 <    }
486 <
487 <    // build up the integrableObjects vector:
488 <
489 <    for (i = 0; i < info[k].n_atoms; i++) {
490 <      
491 < #ifdef IS_MPI
492 <      slI = info[k].atoms[i]->getGlobalIndex();
493 < #else
494 <      slI = i;
495 < #endif
496 <
497 <      if (skipList.find(slI) == skipList.end()) {
498 <        mySD = (StuntDouble *) info[k].atoms[i];
499 <        info[k].integrableObjects.push_back(mySD);
500 <      }
501 <    }
502 <    for (i = 0; i < info[k].rigidBodies.size(); i++) {
503 <      mySD = (StuntDouble *) info[k].rigidBodies[i];
504 <      info[k].integrableObjects.push_back(mySD);      
505 <    }
506 <    
518 >    }    
519    }
520  
521   #ifdef IS_MPI

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines