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

Comparing trunk/OOPSE-2.0/src/brains/SimInfo.cpp (file contents):
Revision 2010 by tim, Sun Feb 13 20:05:42 2005 UTC vs.
Revision 2082 by tim, Mon Mar 7 22:39:33 2005 UTC

# Line 144 | Line 144 | SimInfo::~SimInfo() {
144   }
145  
146   SimInfo::~SimInfo() {
147 <    //MemoryUtils::deleteVectorOfPointer(molecules_);
148 <
149 <    MemoryUtils::deleteVectorOfPointer(moleculeStamps_);
147 >    std::map<int, Molecule*>::iterator i;
148 >    for (i = molecules_.begin(); i != molecules_.end(); ++i) {
149 >        delete i->second;
150 >    }
151 >    molecules_.clear();
152 >    
153 >    MemoryUtils::deletePointers(moleculeStamps_);
154      
155      delete sman_;
156      delete simParams_;
# Line 765 | Line 769 | void SimInfo::getCutoff(double& rcut, double& rsw) {
769                  "\tfor the cutoffRadius.\n");
770              painCave.isFatal = 0;
771              simError();
772 <            rcut_ = 15.0;
772 >            rcut = 15.0;
773          } else{
774 <            rcut_ = simParams_->getRcut();
774 >            rcut = simParams_->getRcut();
775          }
776  
777          if (!simParams_->haveRsw()){
# Line 777 | Line 781 | void SimInfo::getCutoff(double& rcut, double& rsw) {
781                  "\t0.95 * cutoffRadius for the switchingRadius\n");
782              painCave.isFatal = 0;
783              simError();
784 <            rsw_ = 0.95 * rcut_;
784 >            rsw = 0.95 * rcut;
785          } else{
786 <            rsw_ = simParams_->getRsw();
786 >            rsw = simParams_->getRsw();
787          }
788  
789      } else {
# Line 787 | Line 791 | void SimInfo::getCutoff(double& rcut, double& rsw) {
791          //meta-data file, the maximum cutoff radius calculated from forcefiled will be used
792          
793          if (simParams_->haveRcut()) {
794 <            rcut_ = simParams_->getRcut();
794 >            rcut = simParams_->getRcut();
795          } else {
796              //set cutoff radius to the maximum cutoff radius based on atom types in the whole system
797 <            rcut_ = calcMaxCutoffRadius();
797 >            rcut = calcMaxCutoffRadius();
798          }
799  
800          if (simParams_->haveRsw()) {
801 <            rsw_  = simParams_->getRsw();
801 >            rsw  = simParams_->getRsw();
802          } else {
803 <            rsw_ = rcut_;
803 >            rsw = rcut;
804          }
805      
806      }
# Line 835 | Line 839 | void SimInfo::setSnapshotManager(SnapshotManager* sman
839   }
840  
841   void SimInfo::setSnapshotManager(SnapshotManager* sman) {
842 +    //if (sman_ == sman_) {
843 +    //    return;
844 +    //}
845 +    
846 +    //delete sman_;
847      sman_ = sman;
848  
849      Molecule* mol;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines