ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/brains/SimInfo.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/brains/SimInfo.cpp (file contents):
Revision 2114 by tim, Thu Mar 10 23:56:42 2005 UTC vs.
Revision 2187 by tim, Wed Apr 13 18:41:17 2005 UTC

# Line 65 | Line 65 | SimInfo::SimInfo(std::vector<std::pair<MoleculeStamp*,
65  
66   namespace oopse {
67  
68 < SimInfo::SimInfo(std::vector<std::pair<MoleculeStamp*, int> >& molStampPairs,
68 > SimInfo::SimInfo(MakeStamps* stamps, std::vector<std::pair<MoleculeStamp*, int> >& molStampPairs,
69                                  ForceField* ff, Globals* simParams) :
70 <                                forceField_(ff), simParams_(simParams),
70 >                                stamps_(stamps), forceField_(ff), simParams_(simParams),
71                                  ndf_(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0),
72                                  nGlobalMols_(0), nGlobalAtoms_(0), nGlobalCutoffGroups_(0),
73                                  nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0),
# Line 147 | Line 147 | SimInfo::~SimInfo() {
147          delete i->second;
148      }
149      molecules_.clear();
150 <    
151 <    MemoryUtils::deletePointers(moleculeStamps_);
152 <    
150 >      
151 >    delete stamps_;
152      delete sman_;
153      delete simParams_;
154      delete forceField_;
# Line 380 | Line 379 | void SimInfo::addExcludePairs(Molecule* mol) {
379          }
380      }        
381  
383    Molecule::CutoffGroupIterator cgIter;
384    CutoffGroup* cg;
385    for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) {
386        std::vector<Atom*> atoms = cg->getAtoms();
387        for (int i = 0; i < atoms.size() -1 ; ++i) {
388            for (int j = i + 1; j < atoms.size(); ++j) {
389                a = atoms[i]->getGlobalIndex();
390                b = atoms[j]->getGlobalIndex();
391                exclude_.addPair(a, b);
392            }
393        }
394    }  
395
382   }
383  
384   void SimInfo::removeExcludePairs(Molecule* mol) {
# Line 450 | Line 436 | void SimInfo::removeExcludePairs(Molecule* mol) {
436          }
437      }        
438  
453    Molecule::CutoffGroupIterator cgIter;
454    CutoffGroup* cg;
455    for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) {
456        std::vector<Atom*> atoms = cg->getAtoms();
457        for (int i = 0; i < atoms.size() -1 ; ++i) {
458            for (int j = i + 1; j < atoms.size(); ++j) {
459                a = atoms[i]->getGlobalIndex();
460                b = atoms[j]->getGlobalIndex();
461                exclude_.removePair(a, b);
462            }
463        }
464    }  
465
439   }
440  
441  
# Line 697 | Line 670 | void SimInfo::setupFortranSim() {
670      }
671      
672      //setup fortran simulation
700    //gloalExcludes and molMembershipArray should go away (They are never used)
701    //why the hell fortran need to know molecule?
702    //OOPSE = Object-Obfuscated Parallel Simulation Engine
673      int nGlobalExcludes = 0;
674      int* globalExcludes = NULL;
675      int* excludeList = exclude_.getExcludeList();
# Line 887 | Line 857 | void SimInfo::setSnapshotManager(SnapshotManager* sman
857   }
858  
859   void SimInfo::setSnapshotManager(SnapshotManager* sman) {
860 <    //if (sman_ == sman_) {
861 <    //    return;
862 <    //}
863 <    
894 <    //delete sman_;
860 >    if (sman_ == sman) {
861 >        return;
862 >    }    
863 >    delete sman_;
864      sman_ = sman;
865  
866      Molecule* mol;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines